[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
RE: [OT] - killing a windows process?
>I still seem to be struggling... - is this the "mugs
>game" that you were referring to!?...
Found something I can help with at last!!! And yeah, it is a mugs game....
:-\
Try this instead.. I know it just works, because I've just done it now!
Setup this constant:
Const PROCESS_ALL_ACCESS = &H1F0FFF
>hProcess = OpenProcess(SYNCHRONIZE, 0&, lProcessId)
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0&, lProcessId)
The SYNCHRONIZE won't work when you want to terminate a process.
>iReturn = TerminateProcess(hThread, 0)
Follow that with:
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject
As Long)
As Long
Call CloseHandle(hProcess)
To tidy up the handle created by OpenProcess.
Do that instead... Works lovely on my work NT4 machine and my 98SE at home.
Steve
[Non-text portions of this message have been removed]
http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe: ukha_d-subscribe@xxxxxxx
Unsubscribe: ukha_d-unsubscribe@xxxxxxx
List owner: ukha_d-owner@xxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Home |
Main Index |
Thread Index
|