IThumbnailProvider 和 IInitializeWithItem
我正在尝试开发一个在 Windows 7 中使用的 IThumbnailProvider
。由于这个特定的缩略图也依赖于同一目录中的其他一些文件,因此我需要使用 IInitializeWithStream
以外的其他文件code> 到要使用的路径,这是 IInitializeWithItem
。 (或者,我可以使用 IInitializeWithFile,但这显然更令人不悦。)
无论我做什么,我都无法让它工作。我有微软的 FileTypeVerifier.exe
工具,它为使用 IInitializeWithItem
开了绿灯,但是当资源管理器调用它时,它似乎只尝试 IInitializeWithStream
,曾经。 (这是通过临时实现所述接口进行测试的,并在其 Initialize()
中发出 Beep() 声)我是否忘记配置某些内容?
简而言之:我如何让它发挥作用?
I am trying to develop an IThumbnailProvider
for use in Windows 7. Since this particular thumbnail would also be dependant on some other files in the same directory, I need to use something other than IInitializeWithStream
to a path to work with, this being IInitializeWithItem
. (Alternatively, I could use IInitializeWithFile
, but that is even more frowned upon apparently.)
No matter what I do, I cannot get it to work. I have Microsoft's FileTypeVerifier.exe
tool which gives the green light on using IInitializeWithItem
, but when explorer calls it, it only seems to try IInitializeWithStream
, ever. (This was tested by temporarily implementing said interface, and Beep()ing away in its Initialize()
) Did I forget to configure something?
In short: how do I get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我终于知道是怎么回事了。引用 MSDN 网站上的构建缩略图提供程序链接:
我知道我的进程已经耗尽,因为我在其他地方读到缩略图提供程序总是耗尽进程。但由于该特定片段几乎位于所有 shell 扩展处理程序上,因此我将其解释为一项非常愉快的复制粘贴工作,因为它需要按照我理解的方式在进程内运行。
我错了。我希望这会在不久的将来对其他人有所帮助。 :)
Okay, I finally found out what is the matter. To quote the Building Thumbnail Providers link on the MSDN website:
I knew I was running out of process since I read elsewhere that thumbnailproviders ALWAYS ran out of process. But since that particular snippet is on almost -all- shell extension handlers, I interpreted it to be a overly happy copy-paste job, since it was -required- to run in-process the way I understood it.
And I was wrong. I hope this will help someone else in the near future. :)