tags:

views:

65

answers:

2

Hi,

I have created a context menu dll (C++ COM DLL) to show iconoverlays (using IShellIconOverlayIdentifier interface). To show the iconoverlays initially I have restarted the explorer. If the system restarts, to display the icon overlays, I need to manually register the dll and restart the explorer once again.

Is there any way to register my com dll before explorer starts. ??

Also, if I uninstall my application the DLL can not be removed. To remove the dll, I need to stop the explorer and other applications (For eg, thunderbird, visual studio) which use my dll, then unregister the dll. Then only I am able to delete the Dll. Is this correct.. Or any thing else I can do.

Thanks in Advance.

+3  A: 

I wonder why you have to register your DLL on every restart of your system. On the other hand it is quite normal that you have to restart explorer.exe and related programs to let the changes - especially done by shell extensions - take effect.

Further, the beahivour you encounter upon deletion is the standard procedure one has to go through when you want to delete your shell extension DLL.

Andreas
That is, because a program automatically holds the handle of its file under Windows.
Andreas
A: 

You may want to use self-registrating DLLs. They include information required to store themselves in the operating system's registry and will automatically store themselves on your machine and become accessible when needed.

A detailed explanation can be found here : Self-Registration (COM)