FIX: IMPLIB Creates Sequential Ordinals

Last reviewed: September 16, 1997
Article ID: Q75245
1.10 1.20 | 1.10 1.20
MS-DOS    | OS/2
kbtool kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft IMPLIB Utility for MS-DOS, versions 1.1 and 1.2
  • Microsoft IMPLIB Utility for OS/2, versions 1.1 and 1.2

SYMPTOMS

With the Microsoft IMPLIB utility versions 1.1 and 1.2, calls into a DLL fail to resolve to the correct function entry point when code or data is added to the DLL at a later date.

CAUSE

When a DLL is written, function entry points can use the _export keyword instead of being defined in the .DEF file. The DLL can then be used as the input file for IMPLIB and an import library will be created that can be used to link with the application. This was a feature added with IMPLIB version 1.1 that shipped with Microsoft C version 6.0.

The problem is that IMPLIB creates sequential ordinal values for the functions in the order they are listed in the module. As a result, if the order in which functions are defined is changed (for example, adding another function at the beginning), all the ordinal numbers that follow will also change. If the .EXE is not relinked with the new import library, the ordinals in the .EXE will be incorrect and the behavior of the application will be undefined.

STATUS

Currently the only workaround is to either relink your applications whenever you modify your DLLs or use a .DEF file as input to IMPLIB.

Microsoft has confirmed this to be a problem in IMPLIB versions 1.1 and 1.2. This problem was corrected in IMPLIB version 1.3.


Additional reference words: 1.10 1.20
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: TlsMisc
Keywords : kb16bitonly
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.