### Create a Module Definition File

There are four ways to create a module definition (.DEF) file:

- Hand code it
- Generate it from a compiled DLL using ILIB
- Generate it from object files using ILIB
- Generate it from object files using CPPFILT

If you require a module definition file, it is strongly recommended you use CPPFILT or ILIB to generate it.

If you use #pragma export or _Export to export your function, you may still need to provide an EXPORTS entry for that function. If your function has the following default characteristics,

- Has no I/O privileges; and
- You do not want the system loader to keep its name resident in memory,

it does not require a module definition file EXPORTS entry. If your function has characteristics other than the defaults, the only way you can specify them is to list them under the EXPORTS keyword in your module definition file.

Module Definition (.DEF) files

Create a Module Definition File Using CPPFILT
Managing Libraries (ILIB Utility)

Example of a Module Definition File