VC++.进程路径2

2021-01-21 05:15

阅读:767

标签:pen   proc   info   ssid   getc   str   and   process   ++   

CString strCurProcessPath;
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, GetCurrentProcessId());
if (hProcess)
{
	TCHAR wsz[MAX_PATH] = { 0 };
	GetModuleFileNameEx(hProcess, 0, wsz, (MAX_PATH - 1) * sizeof(TCHAR));
	strCurProcessPath = wsz;
	CloseHandle(hProcess);
}

VC++.进程路径2

标签:pen   proc   info   ssid   getc   str   and   process   ++   

原文地址:https://www.cnblogs.com/dailycode/p/12896613.html


评论


亲,登录后才可以留言!