16.2 Overview

A module-definition (.DEF) file is a text file that describes the name, attributes, exports, imports, system requirements, and other characteristics of an application or dynamic-link library (DLL). This file is required for DLLs and overlaid DOS programs. It is optional (but desirable) for other segmented executable files, such as Windows applications, and is usually not necessary for other DOS programs. For information on using .DEF files for overlays, see Chapter 15.

You use module-definition files in the following two situations:

You can specify a module-definition file in LINK's deffile field. The module-definition file gives the LINK utility the information that is necessary for linking the program. For specific information on using a .DEF file when linking, see topic .

You can use the Microsoft Import Library Manager utility (IMPLIB) to create an import library from a module-definition file for a DLL (or from the DLL created by a module-definition file). You then specify the import library in LINK's libraries field when linking an application that uses functions and data in the DLL. For information on IMPLIB, see topic .

Note:

The term “function” as used in this chapter refers to any routine for the programming language being used: function, procedure, or subroutine.