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);
}