#include "stdafx.h" #include <Windows.h> int _tmain(int argc, _TCHAR* argv[]) { HWND h=FindWindowA(NULL,"代码注入器 郁金香灬软件 QQ:150330575——出售游戏外挂技术,教程"); printf("h=%llx \n",h); DWORD pid=0; GetWindowThreadProcessId(h,&pid); printf("pid=%d \n",pid); HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS,false,pid); printf("hProcess=%llX \n",hProcess); DWORD pidNew=GetProcessId(hProcess); printf("pidNew=%d \n",pidNew); getchar(); return 0; } //结果 肯定是 pid与pidNew 相等呗 |
GetProcessId 函数使用方法 示例
最新推荐文章于 2023-07-06 15:50:54 发布