函数换了吗【已解决】
本帖最后由 woeiwoei 于 2010-12-29 16:54 编辑#include <WinAPIEx.au3>
Run('Notepad.exe')
Sleep(3000)
$process = 'Notepad.exe'
$hProcess = ProcessExists($process)
_WinAPI_SuspendProcess($hProcess)
Sleep(5000)
_WinAPI_ResumeProcess($hProcess)
例子中的 _WinAPI_SuspendProcess,_WinAPI_ResumeProcess 运行时提示:undefined function.
请教各位大大~~~这个函数 换了吗?? 我的版本 是 3.3.6.1 汉化第二版~ Func _ProcessSuspend($process)
$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)
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)
$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)
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
要么你的帮助文件版本太高或太低 反正没有ResumeProcess的API 回复 2# lainline
晕哦~~谢谢你~
页:
[1]