c++ - 在不使用 StorageFile.GetFileFromPathAsync 的情况下获取 Windows.Storage.StorageFile 对象
问题描述
StorageFile.GetFileFromPathAsync
如果文件是隐藏文件或快捷方式,即使 UWP/Win32 应用程序可以使用其他 API(即...FromApp
API,尽管它们也有一些限制)访问这些位置,API 也会失败。对于 Win32 应用程序,可以获取IShellItem
对象并将其绑定到,IStorageItem
但在 UWP 中这是不可能的,因为IShellItem
它不适用于 UWP。有没有其他方法可以绕过StorageFile.GetFileFromPathAsync
限制来获取StorageFile
可以使用 UWP 应用模型完成的对象?
解决方案
推荐阅读
- ampl - 有没有办法从 Ampl 中的集合中将特定变量设为整数?
- reactjs - 重构 ReactJs App 时的顺序(从测试、打字稿、钩子开始)
- reactjs - 反应中复制文本的问题
- php - 无法发布分钟,小时工作
- python - 为什么 Pycharm 在 typing.py 中打开 MutableMapping 而不是 _collections_abc.py 中的类 MutableMapping 定义
- python - python检查路径后的值是否相同
- vba - 访问 VBA 错误:表达式引用已关闭的对象
- java - 为什么 mongodb java 驱动程序在 ObjectId 中使用随机字节而不是机器 id?
- python - 如何将熊猫数据框列中的两种不同日期格式转换为相同格式?
- php - 获取帖子缩略图 URL 并分配给变量