Software Archive
Read-only legacy content
17060 Discussions

name of COM library

rahzan
New Contributor I
770 Views
It seems that the COM sever wizd always names the library the SAME as the first object it contains. So e.g. the CLSID of the sample adding machine is always "AddingMachine.AddingMachine" instead of something better like "Calculator.Adder"
Am I missing a step?

Thanks, Tim
0 Kudos
4 Replies
Intel_C_Intel
Employee
770 Views
Hi Tim,

The library does not have a ProgID (e.g. "AddingMachine.AddingMachine"), but each class does. You can change that to whatever you want in the properties page of the class. Just change the "ProgID" value.

Leo
0 Kudos
rahzan
New Contributor I
770 Views
Thanks Leo,
I tried what you said but whijle the porgID can bechanged in the properties (right panel con the COM server wizd)
1. the class name onthe left panel stays the same
2. The interface likewise remains the same
3. the UIclass file name does not change to the new class name but UIclassTY does.

Am I still missing it?

Tim
0 Kudos
Intel_C_Intel
Employee
770 Views
Hi Tim,

The ProgID does not have to match the Class name or interface name. It is merely a text alias (which cannot be guaranteed to be unique) for the CLSID (which is unique if you follow the rules...). So, changing the ProgID field does not change anything else. If you want to change a class name, interface name, etc., in the left pane click on the name, wait a couple of seconds, and then click on it again. This puts the name into "edit mode".

Is this what you wanted to do?

Leo
0 Kudos
rahzan
New Contributor I
770 Views
Thanks,
I think that your answer covers my points 1 and maybe 2, but point 3 still applies. I assume that I can manually change the name of the dang file if I have to.

It still appears that if I want to have a distinct ProgID it's easiest to just let the wizd create the first Object as it would then delete it and start with new ones. If I'm right It would be a nice to ask the user separately for the interface and the first Object name separately during the wizrd's first run.

Tim
0 Kudos
Reply