FIX: DB Control Sample Release Build Won't Register

ID: Q132203

1.20 WINDOWS kbole kbfixlist kbbuglist

The information in this article applies to:

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:

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 kbCtrl kbbuglist kbfixlist
Version           : 1.20
Platform          : WINDOWS
Solution Type     : kbfix

Last Reviewed: September 21, 1997