摘要: 代码有些拙略,能够根据进程名字获取进程的全路径。但是以32位编译的代码不能获取64位进程信息,GetLastError等于299。#include #include #include #include using namespace std;char* GetProcessPath(char* szProcessName){ PROCESSENTRY32 pe32; pe32.dwSize = sizeof(pe32); HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (... 阅读全文
posted @ 2014-02-11 15:09 qhsmall 阅读(934) 评论(0) 推荐(0)