Link to home
Start Free TrialLog in
Avatar of rmichels
rmichels

asked on

Change GUID in VStudio C++ OCX

Hi

A seeming simple thing, but I can't find a reference on how to do this.

I wrote and ActiveX control in Visual Studio 6.  I want to break off from the current interface and create a newly referenced control...new name, new GUID.

The ODL file has lines as follows:

[ uuid(11518DD5-DD1F-11D4-9B28-000000000000), version(1.1),
.
.
.
library RICHTEXTBOXLib
{
      importlib(STDOLE_TLB);
      importlib(STDTYPE_TLB);

      //  Primary dispatch interface for CRichTextBoxCtrl

      [ uuid(11518DD6-DD1F-11D4-9B28-000000000000),
.
.
.
      //  Event dispatch interface for CRichTextBoxCtrl

      [ uuid(11518DD7-DD1F-11D4-9B28-000000000000),
        helpstring("Event interface for RichTextBox Control") ]
.
.
.
      //  Class information for CRichTextBoxCtrl

      [ uuid(11518DD8-DD1F-11D4-9B28-000000000000),

Can I just generate a new set of GUIDs and replace these?  Are the sequential aspects of these existing GUIDS important?

Thanks
Avatar of AlexFM
AlexFM

You can generate new GUIDs and replace existing. Sequence doesn't matter - GUIDs are not compared in COM.
For example, Visual Basic generates new GUIDs for COM Library in every build if "No compatibility" option is selected. The result is completely new COM component (even if it has the same name).
ASKER CERTIFIED SOLUTION
Avatar of nabehs
nabehs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial