|
楼主 |
发表于 2011-2-13 18:26:36
|
显示全部楼层
在官網找到的
Func _ProcessSuspend($process) ; PAUSE
LOCAL $processid,$ai_Handle,$i_sucess
$processid = ProcessExists($process)
If $processid Then
$ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
$i_sucess = DllCall("ntdll.dll","int","NtSuspendProcess","int",$ai_Handle[0])
DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
If IsArray($i_sucess) Then
Return 1
Else
SetError(1)
Return 0
Endif
Else
SetError(2)
Return 0
Endif
EndFunc
Func _ProcessResume($process) ; GO
LOCAL $processid,$ai_Handle,$i_sucess
$processid = ProcessExists($process)
If $processid Then
$ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
$i_sucess = DllCall("ntdll.dll","int","NtResumeProcess","int",$ai_Handle[0])
DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
If IsArray($i_sucess) Then
Return 1
Else
SetError(1)
Return 0
Endif
Else
SetError(2)
Return 0
Endif
EndFunc |
|