189 8069 5689

【API】枚举Windows系统所有进程

#include   
#pragma comment(lib,"Psapi.lib") 

DWORD dwProcesses[1024], dwRes;  
EnumProcesses(dwProcesses,sizeof(dwProcesses),&dwRes);  

for (int i = 0; i < dwRes / sizeof(DWORD); i++)  
{  
    printf("%d %d\r\n",i,dwProcesses[i]);  
}  

网页名称:【API】枚举Windows系统所有进程
本文来源:http://cdxtjz.cn/article/pdpipe.html

其他资讯