BOOL GetMyTempPath(CString &strMyTempPath)
{
TCHAR lpszTemp[512];
GetTempPath(512,lpszTemp);
CString strTempPath;
strTempPath.Format(_T("%s\\MyData"),lpszTemp);
if (!PathFileExists(strTempPath))
{
if(!CreateDirectory(strTempPath,NULL));
return FALSE;
}
strMyTempPath = strTempPath;
return TRUE;
}
【框架-MFC】MFC 获取环境变量中的TEMP目录
最新推荐文章于 2019-11-27 17:23:50 发布