Skip to content

Instantly share code, notes, and snippets.

@metametaclass
Created September 17, 2012 17:08
Show Gist options
  • Save metametaclass/3738528 to your computer and use it in GitHub Desktop.
Save metametaclass/3738528 to your computer and use it in GitHub Desktop.
path get_known_folder_path(int nFolder)
{
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(NULL, nFolder, NULL, SHGFP_TYPE_CURRENT, szPath)))
{
return path(szPath);
}
else
{
nlogger::LogLastError(L"get_known_folder_path: SHGetFolderPath error");
return path();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment