PRB: FLL Causes Error After Recompilation
Article ID: 198130
Article Last Modified on 12/11/2003
APPLIES TO
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q198130
SYMPTOMS
After building an FLL in Visual C++ 6.0, you may get one of the following
error messages when calling a function in the FLL from Visual FoxPro:
API Caused an Exception
-or-
The error occurs when loading the debug build of the FLL, but not with
the release build.
CAUSE
The project has been compiled in Visual C++ version 6.0 with debug
information using the new "Edit and Continue" format. This is why a release
build of the FLL works and a debug build that uses "Edit and Continue" for
the debug information format fails. The default setting for a debug build
in Visual C++ 6.0 is to use a "Program database for Edit and Continue."
This causes tokens to be inserted in the compiled program that are not
recognized by FoxPro.
NOTE: It appears that the errors occur only when compiling on Windows NT.
RESOLUTION
Use one of the following workarounds:
- Compile the project as a release build.
- Change the project settings. In the Project Settings dialog box, click
the C/C++ tab. Select General in the Category box, and change the
selection in the Debug Info: box from "Program database for Edit and
Continue" to "Program Database."
STATUS
This behavior is by design.
Keywords: kbprb KB198130