How to Change the Class id of an ActiveX control?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Gordon Scott (gscott2112_at_hotmail.com)
Date: 05/13/04


Date: Thu, 13 May 2004 11:09:07 -0700

Hi all,

I have an application that was written in eVC++ 3.0 for Pocket PC 2002.
I am now porting this to Pocket PC 2003 and using eCV++ 4.0.

The application uses a custom ActiveX control that gets embedded in Pocket
IE.
The application grabs html and jscript files from our server. All of our
html files use an

<OBJECT CLSID:.....> tag to instaniate the controls.

Now that I have rebuilt the ActiveX control in eVC++ 4.0, The objects in the
dll have new class ids.
I want to avoid having separate content servers and would like to modify the
dll so that the objects between the
2002 and 2003 dll have the same CLASSIDs.

Anyone know how this can be done?

I have changed the class ids in the .idl file as below, to the class id used
in the old dll

[
  uuid(2422AA8D-DC0B-449F-930F-B538FF7153CF),
  helpstring("ImageButton Class")
 ]
 coclass ImageButton
 {
  [default] interface IImageButton;
  [default, source] dispinterface _IImageButtonEvents;
 };
 [
  uuid(01EB15F4-3649-4C13-B683-48D7AB23972F),
  helpstring("_IListBoxEvents Interface")
 ]

When I recompiled, the header files and the project_i.c file contained the
correct class ids. When I register the dll on the device however, I am
seeing registry entries with the new CLASSIDs instead of the old ones. What
am I missing?

Thanks,
Gordo.


Quantcast