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 16.1 summarizes the purpose of the module statements and shows the order in which they are discussed in this chapter.
Table 16.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 |
APPLOADER | Replaces the default Windows loader with a custom loader |
EXETYPE | Identifies the target operating system |
PROTMODE | Specifies a protected-mode Windows program |
REALMODE | Specifies a real-mode Windows program |
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 |
FUNCTIONS | Specifies function order and location |
INCLUDE | Inserts a file containing module statements |