Uhm, what about the SendMessageTimeout function?
I tried to figure out how it works, but I couldn't found anything... I tried this code, but it seems to have wrong parameters or something...
I think WM_NULL is not that good, but I have no idea what to use else... anyone knows?Code:Function HungUp(iProcess As ProcessEntry32) As Boolean Dim Temp As Long Dim Process As Long Process = OpenProcess(PROCESS_TERMINATE, 0, iProcess.ProcessID) Temp = SendMessageTimeout(Process, WM_NULL, 0, 0,_ SMTO_NORMAL Or SMTO_ABORTIFHUNG Or SMTO_BLOCK, 1000, Temp) If Temp = 0 Then HungUp = True End If End Function
Thanks in advance!




Reply With Quote