cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CoolSwarvy
Level 3

Gaps in my understanding of DLL registration

Hello Everyone,

I am new to InstallShield and there are still some areas where my knowledge is very weak. I was hoping that someone would be kind enough to fill in some of the gaps when it comes to DLL registration.

If I add a component to a feature and then add a DLL file to that component (setting the dll as the componeny Key File), how is that DLL registered during the installation process? Is it necessary to create a custom action to perform the registration? I would make the assumption that unless 'self-registration' is selected for a given DLL, Installshield will not register the component during the installation process? If a file has 'self-register' selected what would happen if this DLL relied upon another DLL which wasn't yet registered - how could one change the order of registration? What are the conditions needed for a DLL to be self-registering? How do I check if the registration process was successful?

Any links to tutorials, references or guides would be extremely helpful,

Thanks,
CoolSwarvy
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The high-level overview goes something like this: Registration is the process of putting certain artifacts in the registry that let things like COM find your DLL and use it correctly. Self-registration is when a DLL has an entry point (DllRegisterServer) that will perform registration for that DLL. However since it actually runs code, the DLL can choose to do anything. Also, as you point out, when multiple DLLs depend on one another's registration, the ability for self-registration to succeed can be order-dependent.

For those last two reasons, plus others related to advertisement, the Windows Installer preferred method is to capture the registration data in the MSI itself so it can register all the files it installs without invoking self-registration. InstallShield offers COM extraction as a way of capturing that data from a self-registering DLL automatically.

As far as detecting whether registration succeeded, you'll need to know more about what the DLL registers, or about another DLL that needs the first to have been registered. InstallShield will warn if COM extraction doesn't detect any registration data, but that's not going to distinguish between a partial and a full registration. So the real test is to see if client code works correctly.
0 Kudos