tags:

views:

42

answers:

1

All,

I have a C++ COM DLL written using Visual Studio. All the interfaces have GUIDs in idl and rgs files. We want to create a new DLL with brand new GUIDs as we want it to co-exist on the same machine with the old one but with different logic. The number of GUIDs is more than 200. Is there a tool that finds the GUIDs and replaces them ? I noticed for every GUID in idl file there are 3 same ones in the rgs files.

I am not really into C++ COM but I have to get this done :

Rgds, MK

A: 

We use the following dumb but working approach: we store all the GUIDs relevant to COM classes and interfaces as #defines in one header that is included into the .idl file. When we need to break compatibility we just open that file and manually replace all the GUIDs. Not very elegant, but reliable and works.

So my suggestion is that you just search for all the GUIDs in your project and replace them. I guess you'll be better off moving them all in one place at the same time.

sharptooth