Fox
May 4th, 2000, 04:52 AM
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...
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
I think WM_NULL is not that good, but I have no idea what to use else... anyone knows?
Thanks in advance!
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...
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
I think WM_NULL is not that good, but I have no idea what to use else... anyone knows?
Thanks in advance!