Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change OCX reference in class?

Status
Not open for further replies.

SteveDingle

Programmer
Jul 26, 2004
254
GB
Heya All,

VFP 9, using DBI OCX controls. I have a control in a container that when I try to open I get an error saying the control isn't licensed.

My assumption is because I have been testing applications, including installing I have inadvertently changed the "registry" pointer to the control in an install folder (as opposed to MY DBI folder) and VFP has somehow picked that up. I can verify this by hacking the VCX file and see the appropriate OLE2 field is pointing to the wrong control.

So my hope was that I could just change the value to pointing to the right licensed control would do it... no luck.

I have also tried clearing out the OLE Object code field, this broke the class.

Finally, I can't easily just copy the license file to the appropriate folder because I it doesn't exist any more.

Anyone know how you can change the OLE2 pointer value and have VFP pick that up

Toodles,
Steve Dingle
D&S Business Solutions Ltd
 
Heya All,

Just to let everyone know I was able to solve the problem by removing all references to the DBI controls in the registry, specifically those listed under HKEY_CLASSES_ROOT.

There were about 3 entries each for the control, (For instance ctListBar was - .ctLISTBAR.ctListBarCtrl.6) I then got the CLSID and found that under HKEY_CLASSES_ROOT and deleted the entire KEY and the initial KEY entry where I got the CLSID. I did that for all entries then re-registered the control via regsrv32 and I was able to my classes again.

Toodles,
Steve Dingle
D&S Business Solutions Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top