Click to See Complete Forum and Search --> : What are issues when renaming a COM component?
sohail_k
March 22nd, 2004, 12:10 AM
Hi there,
I have created a COM component using C++ which is already installed on my system and is being used by few applications.
I want to know what issues i'll have to consider if I wish to have this same DLL with a different name on my system.
I mean if I rename this DLL and install it , apart from changing the CLSID , ProgId what all things I'll need to change in this DLL if I wish to have both my DLL's to be registered on my system.
Any thoughts?
Thank You.
Have a nice day!
C.Schlue
March 24th, 2004, 04:04 PM
You'll only need register it again under the new name I guess ;)
(regsrv32 "DllPath&Name")
sohail_k
March 25th, 2004, 11:16 PM
Hi C.Schlue.
I was thinking about what you said regarding registering with new name....
But it was not very clear to me that did you mean "after Changing progid and clsid" and then registering with different name....
Also Will I have to change the Interface Guid's also?
Also what things i'll have to update if I am using ATL .....
(I guess the .idl file and .rgs file )anything other than that?
Thanx.
Regards,
Sohail
C.Schlue
March 26th, 2004, 03:19 AM
So, what exactly do you want to do???
If you only want to rename the Dll (the File), rename it and register it . Nothing more.
If you want to modify the Interface Names, ProgIds, Helpstrings... change them in the idl, then compile/register again.
There'll be no need to modify any CLSIDs.
sohail_k
March 26th, 2004, 05:38 AM
Hi C.Schlue,
If I just rename the dll then it can overwrite an existing copy with the new one in registry. Actually i dont want to replace the old DLL in registry.
Thats is why i wrote about the need of changing CLSID, ProgId of Dll so that when it gets registered in registry the Copy with Old name still exists.
Yes, As you said that i should change it in IDL file , i'll make the changes and compile it...
But I have one more question ie: My Dll is made in ATL and as there is a .RGS file (registrar object) ... will I have to change that file also along with IDL file?
Regards,
Sohail
C.Schlue
March 26th, 2004, 05:54 AM
I'm not sure about that, but as far as I can see the compiler uses information in the rgs file to associate progIds with CLSIDs.
VC does not automaticly update the file if you change the idl. So, if you want to change CLSIDs or ProgIDs, youll have to update this file as well.
sohail_k
March 30th, 2004, 05:58 AM
Thanx C.Schlue.
All your answers were very helpfull...
I have changed the files and it is working fine
Have a nice day!
Regards.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.