How To Disable Shell Extension In FileOpen Dialog

青春壹個敷衍的年華 提交于 2019-12-01 08:29:18

问题


I am talking about windows shell extensions.

I have a shell extension which could show the specific properties of my customized file type, say, *.filetype. And of course it will cause my shell extension dlls being loaded into the explorer.exe process. But now if I fire the FileOpen dialog in any application and check the file properties inside that dialog(notepad as an example), then these shell extension dlls would be loaded into notepad.exe process, which is the case I want to avoid.

So is it possible to disable a specific shell extension in FileOpen Dialog?

Thanks.


回答1:


Create a shim dll which does nothing but load your real (big) shell extension dll. The only job of that shim dll is to check whether the current process is "explorer.exe". If it is, the shim loads the real dll and forwards all calls there. If it's not, the shim doesn't load your real dll but simply returns E_NOTIMPL or something like that to all requests.



来源:https://stackoverflow.com/questions/1635410/how-to-disable-shell-extension-in-fileopen-dialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!