本帖最后由 zps26 于 2010-10-6 21:33 编辑
多谢楼主的用心付出,DLLCALL的使用相当重要,正在认真学习这部分内容呢
试验GetCurrentProcessId函数:
$result=DllCall("Kernel32.dll","DWORD","GetCurrentProcessId")
MsgBox(0,"CurrentProcessId",$result[0])
试验FindWindow函数:
Run("notepad.exe")
Sleep(1000)
$result=DllCall("user32.dll","HWND","FindWindow","str","Notepad","str","无标题 - 记事本")
DllCall("user32.dll","int","MessageBox","HWND",0,"str",$result[0],"str","用dllcall显示窗口句柄","uint","0x40")
MsgBox(0,"窗口句柄",$result[0])
MsgBox(0,"窗口类名",$result[1])
MsgBox(0,"窗口标题",$result[2])
|