FIX: IMPLIB Creates Sequential Ordinals

ID: Q75245


The information in this article applies to:
  • Microsoft IMPLIB Utility for MS-DOS, versions 1.1, 1.2
  • Microsoft IMPLIB Utility for OS/2, versions 1.1, 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 query words: 1.10 1.20

Keywords : kb16bitonly
Version : MS-DOS:1.1,1.2; OS/2:1.1,1.2
Platform : MS-DOS OS/2
Issue type :


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.