1. 获取路径
TCHAR szPath[MAX_PATH] = {0}; GetModuleFileName(NULL, szPath, MAX_PATH); LPTSTR ext = _tcsrchr(szPath, _T('\\')); if (ext) ext[1] = _T('\0'); _tcscat_s(szPath, _T("Config\\Template.xml")); if (!PathFileExists(szPath)) { return; }
2023-10-10 19:56:16
1. 获取路径
TCHAR szPath[MAX_PATH] = {0}; GetModuleFileName(NULL, szPath, MAX_PATH); LPTSTR ext = _tcsrchr(szPath, _T('\\')); if (ext) ext[1] = _T('\0'); _tcscat_s(szPath, _T("Config\\Template.xml")); if (!PathFileExists(szPath)) { return; }
下一篇:C#笔记 采集卡测试