004
14.02.2007, 20:51 Uhr
-Biohazard-
|
Auf die einfachste Art
C++: |
DWORD processID; HANDLE hProcessSnap; HANDLE hProcess; string mystring; PROCESSENTRY32 pe32; pe32.dwSize = sizeof( PROCESSENTRY32 ); hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); do { hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID ); mystring = pe32.szExeFile; if(mystring == "Test.exe") { processID = pe32.th32ProcessID; hProcess = OpenProcess (PROCESS_ALL_ACCESS, TRUE, processID); TerminateProcess (hProcess, 0); } } while ( Process32Next( hProcessSnap, & pe32 ) ); CloseHandle( hProcessSnap );
|
MfG --
|