资源管理器缩略图 (winXP)

发布于 2024-07-17 13:40:10 字数 113 浏览 4 评论 0原文

我有一种文件格式需要能够在资源管理器缩略图中显示。 由于目标系统是Windows XP,因此Vista PreviewHandler API 不适合。 我将使用c++。

我该怎么做呢?

I have a file format I need to be able to show in explorer thumbnails. Since the target system is windows XP, the Vista PreviewHandler API will not be suitable. Ill be using c++.

How would I do it?

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

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

发布评论

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

评论(2

杀お生予夺 2024-07-24 13:40:10

您需要为您的文件类型注册一个 shell 扩展。 该扩展包含通过实现 IExtractImage 接口来提取/生成缩略图的代码。

请参阅:MSDN 上的 IExtractImage 接口

You'll need to register a shell extension for your file type. The extension contains code that extracts/generates the thumbnail by implementing the IExtractImage interface.

See: IExtractImage Interface on MSDN

口干舌燥 2024-07-24 13:40:10

https://github.com/reliak/moonpdf/tree/ master/ext/sumatra/src/previewer 是一个完美的例子。

为了构建 x86 和 x64 版本的 DLL,我使用带有 SP1 的 VS 2010 以及安装在 Windows 7 x64 上的 Win7 x64 SDK(针对 )。 构建的 DLL 在任意位数的 Win7 和 Win10 上都可以正常工作。

另外,不要忘记 /MD 链接器标志,以避免需要在 WinXP 上安装 Microsoft Visual C++ 2010 Redistributable Package (x86)

可以将下一行添加到 "targetver.h" 中,以避免导入和使用较新版本的 Windows 系统 DLL 中的新函数(例如,WinXP 的 RegDeleteTreeW 中没有 RegDeleteTreeW code>advapi.dll):

#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#include <winsdkver.h>
#include <SDKDDKVer.h>

此外它还实现了某些文件格式的预览器,但在您的实现中可以完全省略相关接口。

https://github.com/reliak/moonpdf/tree/master/ext/sumatra/src/previewer is perfect example.

To build both x86 and x64 versions of DLL I use VS 2010 with SP1 along with Win7 x64 SDK (for <thumbcache.h>) installed on Windows 7 x64. Builded DLLs works fine on Win7 and Win10 of either bitness.

Also don't forget /MD linker flag to avoid necessity to install Microsoft Visual C++ 2010 Redistributable Package (x86) on WinXP.

Next lines may be added to "targetver.h" to avoid import and using of new functions from newer versions of Windows system DLLs (say, there is no RegDeleteTreeW in WinXP's advapi.dll):

#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#include <winsdkver.h>
#include <SDKDDKVer.h>

Additionally it has implementation of previewer for some file formats, but related interfaces can be completely omitted in your implementation.

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