A module-definition file contains one or more “module statements.” Each module statement defines an attribute of the executable file, such as its name, the attributes of program segments, and the number and names of exported and imported functions and data. Table 13.1 summarizes the purpose of the module statements and shows the order in which they are discussed in this chapter.
Table 13.1 Module Statements
Statement | Purpose |
NAME | Names the application (no library created) |
LIBRARY | Names the DLL (no application created) |
DESCRIPTION | Embeds text in the application or DLL |
STUB | Adds a DOS executable file to the beginning of the file |
EXETYPE | Identifies the target operating system |
PROTMODE | Specifies a protected-mode application or DLL |
REALMODE | Supported for compatibility |
STACKSIZE | Sets stack size in bytes |
HEAPSIZE | Sets local heap size in bytes |
CODE | Sets default attributes for all code segments |
DATA | Sets default attributes for all data segments |
SEGMENTS | Sets attributes for specific segments |
OLD | Preserves ordinals from a previous DLL |
EXPORTS | Defines exported functions |
IMPORTS | Defines imported functions |