我正在 Windows 10 上使用 Visual Studio 2015 编写 Windows 应用商店应用程序。我的代码如下:
#define WINVER 0x0A00
#define _WIN32_WINNT 0x0A00
#include <Shlobj.h>
...
HRESULT hr;
hr= SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &tempPath);
我尝试添加以上版本和头文件。仍然没有任何改变。 我该如何解决这个问题?
最佳答案
根据documentation该功能仅在桌面上可用。
Minimum supported client Windows Vista [desktop apps only]
您正在编写一个商店应用程序,因此您无法使用该功能。
关于c++ - 错误: identifier :"SHGetKnownFolderPath" is unidentified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34432213/