Windows 7 库

发布于 2024-08-03 17:18:25 字数 336 浏览 4 评论 0 原文

我希望有人可以帮助我,因为我无法找到正确的方法。

我目前正在开发一个应用程序,该应用程序应该能够枚举所有 Windows 库并显示其内容。

目前,我可以获得所有标准 Windows 7 库(文档、图片、视频和音乐等)的包含文件夹。

问题是我不知道如何获取自定义用户定义库的信息,因为 IShellLibrary::SHLoadLibraryFromKnownFolder() 需要特定的文件夹 GUID,这并未在 KnownFolders.h 中真正定义。

如果可能的话,我只需要列出所有库的名称并获取它们各自的 GUID。

I hope someone can help me with this, as I'm unable to find the right method to do it.

I am currently developing an application that should, in part, be able to enumerate all the Windows Libraries and display their contents.

For now, I am able to get the included folders for all the standard Windows 7 libraries (Documents, Pictures, Videos and Music, etc).

The problem is that I don't know how to get the info of custom user-defined Libraries, as the IShellLibrary::SHLoadLibraryFromKnownFolder() needs the specific folder GUID, which is not really defined in KnownFolders.h.

I only need to list all Libraries' names and fetch their respective GUIDs, if it's possible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尹雨沫 2024-08-10 17:18:25

从技术上来说,您似乎可以创建一个库定义文件并将其放置在系统上的任何位置。如果无法搜索所有这样的定义文件,也许您可​​能会考虑将自己限制为枚举众所周知的 shell 文件夹 FOLDERID_Libraries 下的所有 shell 项?此文件夹的 ID 应位于最新版本 Windows SDK 的 KnownFolders.h 中。

对于此文件夹下遇到的每个 shell 项目,您应该能够调用 IShellLibrary 对象,请使用“nofollow noreferrer">SHLoadLibraryFromItem“加载”该库。

It seems like you can technically create a library definition file and place it anywhere on a system. Short of searching for all such definition files, perhaps you might consider limiting yourself to enumerating all shell items under the well-known shell folder FOLDERID_Libraries? The ID for this folder should be in KnownFolders.h in the latest version of the Windows SDK.

For each shell item that you come across under this folder, you should be able to call SHLoadLibraryFromItem to "load" the library if you need access to an IShellLibrary object for it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文