CString GetExePath()const { TCHAR directory [200] = {ZERO_VAL}; GetModuleFileName(NULL, directory, sizeof(directory)); CString l_strFilePath = directory; TCHAR ch = _T('\\'); int location = l_strFilePath.ReverseFind(ch) ; l_strFilePath = l_strFilePath.Left(location+1); return l_strFilePath; }
GetLongPathName
The string returned will use the same format that was specified when the module was loaded.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)