标签:c style class blog code java
// 获取文件运行路径 void GetAppFilePath(const CString& strProjectName) { TCHAR szFileName[MAX_PATH]; HMODULE hModule = GetModuleHandle(strProjectName); if (0 != GetModuleFileName(hModule, szFileName, MAX_PATH - 1)) { szFileName[MAX_PATH - 1] = ‘\0‘; } TCHAR * p = _tcsrchr(szFileName, ‘\\‘) + 1; if (p) { *p = ‘\0‘; m_strModulePath = szFileName; } } // 连接两个路径 WCHAR szFilePath[MAX_PATH]; PathCombine(szCfgFilePath, m_strModulePath, _T("localdata\\config.ini"));
标签:c style class blog code java
原文地址:http://www.cnblogs.com/xuejianhui/p/3757207.html