int main() { DWORD dwpid = GetCurrentProcessId(); HANDLE hProcess = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwpid); printf("===pid=%d handle=%d\n", dwpid, hProcess); system("pause"); }
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
Zn风扇 每个进程有个句柄表,保存打开的句柄,句柄与进程有关,不能夸进程