TCHAR tchBuffer[MAX_PATH];
LPTSTR lpszCurDir = tchBuffer;
GetCurrentDirectory(MAX_PATH, lpszCurDir);
CString cstrCurDir(lpszCurDir);
CString cstrConfPath = cstrCurDir+ _T("\\yourFileName.xxx");
LPTSTR lpszConfPath = new TCHAR[cstrConfPath.GetLength()+1];
lstrcpy(lpszConfPath, cstrConfPath);
// DoSomething();
delete lpszConfPath;
获取当前工作目录下某个文件的全路径
最新推荐文章于 2022-03-14 18:59:44 发布