35 std::string getSpecialFolderLocation(
const int folderId)
38 LPITEMIDLIST pItemIdList;
40 char szPath[_MAX_PATH];
43 HRESULT hr = SHGetSpecialFolderLocation(
nullptr, folderId, &pItemIdList);
48 if (SHGetPathFromIDList(pItemIdList, szPath) == FALSE)
52 hr = SHGetMalloc(&pMalloc);
53 pMalloc->Free(pItemIdList);