C++判断安装系统的盘符
wstring getWindowsDirectory() { wstring wstr; UINT size=GetWindowsDirectory(NULL,0); wchar_t *path=new wchar_t[size]; if(GetWindowsDirectory(path,size)!=0) //函数调用失败将返回0 { wstr=path; } delete [] path; return wstr; }
wstring getWindowsDirectory() { wstring wstr; UINT size=GetWindowsDirectory(NULL,0); wchar_t *path=new wchar_t[size]; if(GetWindowsDirectory(path,size)!=0) //函数调用失败将返回0 { wstr=path; } delete [] path; return wstr; }