/*++ Copyright (c) 1994 Microsoft Corporation Module Name: kill.c Abstract: This module implements a working set empty application. Author: Lou Perazzoli (loup) 20-May-1994 Wesley Witt (wesw) 20-May-1994 Environment: User Mode --*/ #include #include #include #include #include "common.h" #define MAX_TASKS 256 DWORD pid; CHAR pname[MAX_PATH]; TASK_LIST tlist[MAX_TASKS]; CHAR System[] = "System"; VOID GetCommandLineArgs(VOID); int _cdecl main( int argc, char *argv[] ) { DWORD i; DWORD numTasks; int rval = 0; TASK_LIST_ENUM te; char tname[PROCESS_SIZE]; LPSTR p; GetCommandLineArgs(); if (pid == 0 && pname[0] == 0) { printf( "missing pid or task name\n" ); return 1; } // // let's be god // EnableDebugPriv(); if (pid) { if (!EmptyProcessWorkingSet( pid )) { printf( "could not empty working set for process #%d\n", pid ); return 1; } return 0; } // // get the task list for the system // numTasks = GetTaskList( tlist, MAX_TASKS ); // // enumerate all windows and try to get the window // titles for each task // te.tlist = tlist; te.numtasks = numTasks; GetWindowTitles( &te ); for (i=0; i