Microsoft KB Archive/75245

= FIX: IMPLIB Creates Sequential Ordinals =

Article ID: 75245

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft IMPLIB Utility for MS-DOS 1.1
 * Microsoft IMPLIB Utility for MS-DOS 1.2
 * Microsoft IMPLIB Utility for OS/2 1.1
 * Microsoft IMPLIB Utility for OS/2 1.2

-



This article was previously published under Q75245



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: kbfix kb16bitonly KB75245

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.