View Full Version : How register a dll ????

06-18-2003, 05:09 AM

I've got a component with several dll inside I want to register.
I want to have a CLSID and ProgID for each dll ?

How can I manage ?
Must I set "COM Extract At build" property to Yes ?
Must I set "Self Register" property to yes on each dll in my component ?
Must I use COM Registration tab ?

I am totaly lost, I've got the impression all those things can be used to register ???

Thanks for all kinds of help

06-18-2003, 05:34 AM
You should use COM extraction. If that doesn't work for some reason you could use the self-register option. COM extraction is preferred since it guaratees a full uninstall of all entries, and support advertising.



06-18-2003, 06:18 AM
Ok thanks, but does the COM extraction option create a unique CLSID for each dll of my component or only a CLSID for my component ?

I must have a unique for each dll !

06-18-2003, 06:38 AM
Only the key file is registered and not the other dll !

How can I do please ?

06-18-2003, 07:12 AM
You should make a separate component for each DLL. That should solve your problem and you will be following the Best Practices guidelines.

06-18-2003, 07:17 AM
Right---some MSI tables (the COM-related tables, service-related tables, file-extension-related tables, ...) assume the file being acted on is the key file of its component. Unless you want to use self-registration, you will have to create multiple components.

06-18-2003, 07:18 AM
No VinnyC I think you haven't got to create separated component for each dll.

I have used Com Extraction for my component.
And for each dll in my component, I have set the property "self register" to yes.

Installing my product, I have inspected the Windows Registry and a unique CLSID is well created for each dll, so I think it's OK.

If you are very experimented in registration and If you're sure I am in the wrong way, thank you to tell me so.

Thank you for help

06-18-2003, 07:20 AM
But Robert, what I the difference of my method (self registration) and the creation of component for each dll ?

Is it doing exactly the same thing ?

Are you sure my method is wrong ?


06-18-2003, 07:26 AM
You should have no more than 1 versioned file per component. So every DLL should be keyfile in it's own component. This is needed for self-repair and updating to function properly. Also COM extraction will only work for the keyfile. If your DLL is keyfile, you'll not need to set the self register option.
Check the "enforce best practices" option in the Developer settings to have this done automagically.



06-18-2003, 07:32 AM
But why all my dll are well registered in the registry then ?

06-18-2003, 07:41 AM
Because you checked 'self-register'. That is not needed when using COM extraction.

06-18-2003, 07:44 AM
Thanks I knew that.

The problem is that by my method I have yet a unique CLSID per dll even if they are all in the same component.

So why do you think I must create individual component, to do what more ?

06-18-2003, 08:11 AM
Keyfiles are important for updates (since Windows Installer will only check the keyfile). COM extraction will also make sure the uninstall will remove everything from the registry that was put there during registration.

06-18-2003, 08:15 AM
Thank you very much.
So, i will only use extram com on separated component.
I won't use self register as you said.

Thank you to evrybody, that's great