invoke CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,0 mov hSnapShot,eax invoke Process32First,hSnapShot,addr stP .while eax lea edi,stP.szExeFile mov esi,dword ptr [szQQ] .if dword ptr [edi] == esi mov eax,stP.th32ProcessID mov @PID,eax invoke EnumWindows,_EnumProc,@PID .endif invoke Process32Next,hSnapShot,addr stP .endw invoke CloseHandle,hSnapShot_EnumProc proc hWnd,lParam LOCAL @dwThreadID invoke GetWindowThreadProcessId,hWnd,addr @dwThreadID push lParam pop eax .if eax == @dwThreadID ;比较PID push hWnd pop hWin invoke _SendHwnd,hWin ;显示句柄 .endif mov eax,TRUE ret_EnumProc endp
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!