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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Class?

Status
Not open for further replies.

MMund

Programmer
Oct 9, 2007
57
CA
Have an app compiled in VFP6 that had been working, yet even though no changes have been made to it, is now throwing the following error:

Class definition TEST.MYCLASS is not found

Have tried recompiling it to a different name and have even tried recompiling to a different name using VFP9, to no avail.

Ideas, anyone?

TIA
MMund
 
That it's looking for Test.Class indicates that it's using a COM object. So it appears that the necessary COM object has been de-registered. Try re-registering it.

Tamar
 
If you run on Vista or Win7, right click on VFP9 in the start menu or right click on vfp9.exe from the program files folder, then choose "Run as administrator". Compile the project and the TEST.MYCLASS will be registerd fine on your development machine, if that OLE class is defined within that project.

That name also indicates the class is part of a project TEST.pjx and the class itself is called MYCLASS and set ole public. This is the way VFP does know you want something compiled as OLE class and the way VFP puts together OLE class names, as long as you don't specify something else in the Servers tab of Project Info dialog.

Bye, Olaf.

 
Have an app compiled in VFP6 that had been working, yet even though no changes have been made to it, is now throwing the following error:

The others are hinting all around this, but if it was working and suddenly doesn't work.... what changed?
 
Thanks to all, here's what it turned out to be:

I am not the original programmer of this system, he is long gone, and documentation was apparently not his strong suit. It turns out that this app can only be compiled and run on one PC in our company. When I compile it and run it on that PC, it appears to work. The acid test will come Thursday, when it's next scheduled automatic run is supposed to happen.
 
MMund

It still sounds like it is a component issue where it is not installed on the other pc. If you go to the PC that it works fine for and browse the registry using rededit and then look you will likely see a reference test.myclass somewhere. I believe (not positive) it will be under HKEY_LOCAL_MACHINE / Software and then from there you will need to look. It might be test.myclass or it might be inside another directory.

If this is a DLL file, as mentioned above, you may need to register it on the new pc. If the new pc has it already, as mentioned you may need to unregister it and then register it again as funny things something happen with computers.



Jim
 
I meant using regedit. Looks like a mistype.

Jim
 
You'll find classes (OLE classes) within HKEY_CLASSES_ROOT. Test.MyClass must be found there. What's stored there is the CLSID of a class name. Then there is HKEY_CLASSES_ROOT\CLSID where all the CLSIDs are listed and within each one there's the info in which EXE, OCX or DLL (and some more exotic file extensons) that class is found within.

Then there is HKEY_LOCAL_MACHINE\Software\Classes\ where the same stuff is again.

If you simply search via regedit for TEST.MYCLASS you should find several entries, continue with F3 until you find the location of the DLL or EXE and then you perhaps find a VFP project creating that OLE class.

As you talk of acid tests, which is a term I only know in conjunction with browser tests and not with software testing in general, it might be the PC is the only one having some suite for unit tests or similar and you'll only find that class there.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top