How to change DCOM guid in vb6?
If you are trying to change the identifier on the server side (DLL or application that publishes this class), VB does it for you when you select "no compatibility" in the project properties, component tab.
If you are trying to change which object is created in the "client" (DLL or application that uses a class published by another dll / app), you need to change the reference (either through references or components, depending on which object we are talking about ) to point to the new version of the server (the one that publishes its class with the updated GUID). This means removing the current link and adding the link to the new server. If the names have not changed, everything else should still work as it did before, but the slight change in the class interface is obvious.
You don't have direct access to GUIDs in VB6 as far as I know.
a source to share
I was able to recompile my replacement DCOM object and use its Guid A ...
- Remove all references to Guid B from the registry.
- delete my replaced DCOM exe file
- Copy to original EXOM EXOM file
- Rename the original EXOM EXOM file to the replacement name
- Recompile the vb project
My guess is that when VB replaces the exe file it looks for the GUID and then reuses that for the recompiled version.
a source to share
You have to compile your application (replacing DCOM object) as a binary compatible with the existing dll so it inherits the same GUID and the version number will increment. if you are overwriting an existing DCOM dll with replacement, everything should work.
For example, in VB6 you can specify binary compatibility in the project dialog settings. Not sure where you will install it for C ++, I think the GUID is nested in the source code.
a source to share