unregistering a .dll ?

Started by
3 comments, last by Seriema 19 years, 8 months ago
I'm completely new to COM with ATL and DLL's. But I'm writing a shell extension. Been following some tuts, and they come with a .rgs file as a resource in the solution (VS). A registration script. It associates a filetype with the dll, extending some functionality in Explorer. I don't understand when this script ran, but now my files are associated. But ... how do I unregister it? Thanx
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
Advertisement
You use regsvr32

In a command prompt (start -> run, type "cmd"), type regsvr32 /u "name"

where name is the name of the dll you want to unregister (with full path probably)
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
thx!

Do I have to do something special in my code to support that? I mean, if the .rgs file removes some key in the register how does it put that back? Is that automagicly supported?

If I want do distribute my .dll, would I need to make a installer (so the uninstaller does what you said) or is there some easier for the user to have and remove my .dll?

I've seen stuff like DllRegisterServer() and DllUnregisterServer(). What happens if you overload them? Are they run by regsvr32 /u ? Or do windows run those by itself?

[Edited by - Seriema on August 25, 2004 6:49:11 PM]
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
The rgs file is a resource, which means it gets embedded in the DLL. If you're using ATL via the wizard in VC, you don't need to do anything special to support it. If you're using ATL on your own, then I have no idea what you'd need to do.

If you distribute your DLL, you will need something to register and unregister it for the user. To register it, the command is just regsvr32 without the /u

I don't know anything about the underlying COM interface (which is what Dll(Un)RegisterServer are part of). Really, it is extremely difficult to find information about dealing with COM when not using ATL or the like to handle everything for you.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
ok, think I got every info I needed. Thanx a bunch! *adds a present to your rating*
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]

This topic is closed to new replies.

Advertisement