Integrating into Windows Explorer context menu

后端 未结 2 2008
天命终不由人
天命终不由人 2020-11-28 07:56

I want to write a small tool, that does the following:

When you right click on a file with a certain file-extension the Windows Explorer context menu shows an additi

2条回答
  •  春和景丽
    2020-11-28 08:31

    It is, incidentally, not supported to use .NET for shell extensions, due to the current inability to host multiple runtime versions in the same process (.NET 4 will lift this restriction).

    Consider the case where you have two shell extensions; one for .NET 3.5, one for .NET 1. Which runtime will get loaded into your process? Well, it's more or less random--it depends which shell extension gets loaded first. Sometimes it might be the 2.0 runtime, sometimes it might be the 1.1 runtime.

    This is also an issue if a .NET program creates common file dialogs; your shell extension may or may not load, and may or may not run with the correct runtime version.

    As such, if you go down the Shell extension route you should use native C++/COM/Win32.

提交回复
热议问题