Question

I have written a Shell Extension in Visual Studio 2010. It implements a Context Menu Handler and File Icon Handler.

On the computer with Visual Studio it works well. But on other computers, registering MyShellExt.dll fails with the message

[Window Title]

RegSvr32

[Content]

The module "MyShellExt.dll" failed to load.

Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.

The specified module could not be found.

[OK]

i have inspected dependencies and found that follow files must be in the same folder with MyShellExt.dll: msvcr100.dll, msvcp100.dll, atl100.dll.

It means that i should include this libraries into my installation package.

How to turn off using of these libraries?

Was it helpful?

Solution

These libraries are the C runtime, C++ runtime and ATL runtime. You can't turn off the first two since then are essential to starting your program running. You can however link to them statically so you won't need to carry them around as DLLs. To do that you go to your project settings C/C++,Code Generation,Runtime Library and choose "Multi threaded" or "Multi threaded Debug" instead of "Multi threaded DLL" or "multi threaded debug dll". Make sure to do that in all the settings configurations (Debug, Relaese etc')

As for the 3rd library (ATL100.dll), it might be affected by this settings as well, I'm not sure. you can potentially remove if you stop using the function imported from it. The dependency walker can tell you what functions you're using from that library. If you can;t stop using that function, its possible that library also has a static version (.lib file instead of .dll file)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top