Registering COM DLLs in Set projects

B

Bruce Wood

Can anyone explain to me (in simple terms, please :) ) what is the
difference between setting the Register property for a DLL in a Setup
project to COM versus COMRelativePath versus COMSelfReg?

I know next to nothing about COM, and I find the MSDN help page:

http://msdn.microsoft.com/library/d...en-us/vsintro7/html/vxgrfregisterproperty.asp

completely unilluminating.

I assume that there is some way that I can look at / test a DLL to see
which one of these three I should use for it... how do I figure it out?
 
M

Michael C

Bruce Wood said:
Can anyone explain to me (in simple terms, please :) ) what is the
difference between setting the Register property for a DLL in a Setup
project to COM versus COMRelativePath versus COMSelfReg?

I know next to nothing about COM, and I find the MSDN help page:

http://msdn.microsoft.com/library/d...en-us/vsintro7/html/vxgrfregisterproperty.asp

completely unilluminating.

I assume that there is some way that I can look at / test a DLL to see
which one of these three I should use for it... how do I figure it out?

Com dlls need to add entries to the registry to allow programs to find and
use them. The dll will add these entries when a function it exports called
DllRegisterServer is called, you can see this function if you view the dll
in dependancy viewer. You can call the function manually by typing "regsvr32
mydll.dll". In the past most installers have called DllRegisterServer when
installing com files but that has become a problem on machines with
restricted access to HLEY_LOCAL_MACHINE. The "solution" to this was to
obtain a list of all the keys the dll creates and have the installer add
these keys to HKEY_CURRENT_USER instead. The problem with this is that it is
only helpful to the currently logged in user and I don't see how it would
get a complete list of the registry keys as the dll is free to add any keys
it likes.

The short answer is run regsvr32 on each dll and if it reports success just
set them to self register and warn if the user has inadequate permissions.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top