Traditional import libraries, that is, libraries that describe the exports from one image for use by another, typically follow the layout described in Section 7, "Archive (Library) File Format." The primary difference is that import library members contain pseudo-object files instead of real ones, where each member includes the section contributions needed to build the Import Tables described in Section 6.4, "The .idata Section." The linker generates this archive while building the exporting application. The section contributions for an import can be inferred from a small set of information. The linker can either generate the complete, verbose information into the import library for each member at the time of the library's creation, or it can write only the canonical information to the library and let the application that later uses it generate the necessary data on-the-fly. In an import library with the long format, a single member contains the following information:
In contrast a short import library is written as follows:
This is sufficient information to accurately reconstruct the entire contents of the member at the time of its use. 8.1 Import HeaderThe import header contains the following fields and offsets:
This structure is followed by two null-terminated strings describing the imported symbol's name, and the dll from which it came. 8.2 Import TypeThe following values are defined for the Type field in the Import Header:
These values are used to determine which section contributions must be generated by the tool using the library if it must access that data. 8.3 Import Name TypeThe null-terminated import symbol name immediately follows its associated Import Header. The following values are defined for the Name Type field in the Import Header, indicating how the name is to be used to generate the correct symbols representing the import:
|