PRB: Existing XLL Not Recognized by Excel After Recompilation
Article ID: 194926
Article Last Modified on 2/12/2007
APPLIES TO
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
- MSPRESS Microsoft Excel 97 Developer's Kit ISBN 1-57231-498-2
This article was previously published under Q194926
SYMPTOMS
When building an XLL in Visual C++ 6.0, you may get the following error
message when trying to load the Excel .xll file:
The file is not in a recognizable format
The error occurs when loading the debug build of the XLL, 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 XLL 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++ version 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 Excel.
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.
Additional query words: SDK Add-in
Keywords: kberrmsg kblangc kblangcpp kbprb KB194926