错误:标识符:“SHGetKnownFolderPath”是不明的 [英] Error: identifier :"SHGetKnownFolderPath" is unidentified

查看:191
本文介绍了错误:标识符:“SHGetKnownFolderPath”是不明的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10上使用Visual Studio 2015编写Windows应用商店应用程序。我的代码如下:

I am writing a Windows Store app with Visual Studio 2015 on Windows 10. My code is as follows:

#define WINVER 0x0A00
#define _WIN32_WINNT 0x0A00
#include <Shlobj.h>

...
HRESULT hr;
 hr= SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &tempPath);

我试图添加上述版本和头文件。仍然没有改变。
我如何解决这个问题?

I tried to adding above version and header files. still nothing changed. How can I fix this?

推荐答案

根据文档的功能,此功能仅在桌面上可用。

According to the documentation of the function, this function is available on the desktop only.


最低支持的客户端 Windows Vista [仅限桌面应用]

Minimum supported client Windows Vista [desktop apps only]

您正在撰写商店应用程式,因此该功能无法使用。

You are writing a store app, and so the function is not available to you.

这篇关于错误:标识符:“SHGetKnownFolderPath”是不明的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆