FIX: DB Control Sample Release Build Won't Register

Q132203

1.20 WINDOWS kbole kbfixlist kbbuglist --------------------------------------------------------------------- The information in this article applies to: - Microsoft OLE Control Developer's Kit (CDK) version 1.2 --------------------------------------------------------------------- SYMPTOMS ======== The control is not registered and the following message is displayed: LoadLibrary("<PATH>...\MSVC\CDK16\SAMPLES\DB\DB.DLL")failed. This happens when all the following conditions are true: - You build the DB sample or your own OLE Control with database support included, in release mode. - You specify the correct database OLE Control import library (OCD25.LIB) on the link line. - To register the control, you click Register Control on the Tools menu. CAUSE ===== The reason for this failure lies in the fact that the database version of the OLE Control library (OCD25.DLL) was built with a .DEF file that contains the following LIBRARY statement: LIBRARY OCD250 This causes the loader to look for OCD250.DLL when loading the DB.DLL. Because the library is actually named OCD25.DLL in the system directory, the loader fails. RESOLUTION ========== Rebuild the import library for OCD25.DLL to include the correct library name by following these steps: 1. Enter the following on the MS-DOS command line to move to the MFC source directory: cd <path>...\msvc\mfc\src 2. Edit the OCD25.DEF file to change the LIBRARY statement from: LIBRARY OCD250 to: LIBRARY OCD25 4. Correct the description statement below it if you want. 5. Save the file. 6. Build the import library: implib /nowep ocd25.lib ocd25.def 7. Copy the import library to the CDK lib directory: copy ocd25.lib ..\..\cdk16\lib 8. Rebuild the DB sample or your OLE Control containing database support in release mode. Make sure the rebuild does a link again. Now, you can click Register Control on the Tools menu to register the sample. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ version 1.53 for Windows. Additional reference words: database cdk ocd25 1.20 KBCategory: kbole kbfixlist kbbuglist KBSubcategory: CDKIss

Keywords : kbole kb16bitonly kbCtrl
Issue type :
Technology :


Last Reviewed: September 23, 1997
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.