Most Foxfire! programs classes start with FF so the chances of your application using the same name is unlikely – but it can happen. Here’s a scenario of where it happened and how it was resolved.


We recently had a customer who was integrating Foxfire! with their custom application. Foxfire! worked perfectly on its own but when they ran it within their application, Foxfire! wouldn’t start, giving an error of “FFREGISTRY is not found”.

Whenever Foxfire! 8+ encounters an error, it puts the memory and environment information into a file named FFERROR.LOG. After taking a look at this file, we could see that the UTILITY.VCX file was not being loaded properly. But why?

Most Foxfire! programs classes start with FF so the chances of your application using the same name is unlikely – but it can happen. In this case, the UTILITY.VCX is used by Foxfire! and doesn’t start with FF. In looking at the application file, I could see that a class library named SYSUTILITY.VCX was also being loaded in from the application itself.

When Foxfire! attempts to load in UTILITY.VCX or any class library, it looks to see if the class library is already loaded. If it is, it will simply return so it doesn’t overload itself or return a “class already in use” error. In this case, it mistook SYSUTILITY for UTILITY.VCX. As a result, it never loaded the correct item.

One solution would be to unload SYSUTILITY.VCX before running Foxfire! with a single RELEASE CLASSLIB ALIAS SYSUTILITY. Then Foxfire! will run properly.

We had a similar scenario with a client using Steven Black’s popular INTL Toolkit and MSGSVC (Message Services). The two versions were conflicting with each other. The solution?

RELEASE PROGRAM FFMSGSVC
RELEASE PROGRAM MSGSVC

Many developers aren’t aware of the RELEASE PROGRAM / RELEASE CLASSLIB methods. These commands let you remove the definition of a program from memory. When FoxPro loads programs, the LATEST implementation is used. So if I have a single program with multiple procedures in it all named the same, it is only the LAST one that gets implemented.

PROCEDURE HelloWorld

MESSAGEBOX(“Hi”)

PROCEDURE HelloWorld

MESSAGEBOX(“Hello”)

PROCEDURE HelloWorld

MESSAGEBOX(“Goodbye”)

If I compile this program and run DO HelloWorld, I will see a “Goodbye” messagebox. The same thing applies to individual programs.

So if you’re finding a conflict between programs, be sure to follow the old song and “Release Me”!