#include <Psapi.h>
#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]);
}
原文地址:http://blog.51cto.com/383156647/2067425
时间: 2024-10-23 07:45:37