wchar_t* getProjectPathXml()
{
wchar_t *wpath = new wchar_t[MAX_PATH];
if (GetCurrentDirectory(MAX_PATH, wpath) != 0)
{
return wpath;
}
else
{
MessageBoxW(NULL, _T("getProjectPath is NULL"), _T("error"), MB_OK);
delete [] wpath;
wpath = NULL;
return NULL;
}
}
例如获取的是 c盘下windos结果为:
“C:\\windos”