Module-Definition File

To build a device-driver DLL, you must have a module-definition (.DEF) file. In the module-definition file, you must export at least two of the following entry-point functions:

Functions are exported by ordinal, as shown in the following example MSSB16.DEF file:

LIBRARY     MSSB16

DESCRIPTION 'wave,aux,mixer:Creative Labs Sound Blaster 16 Driver'

EXETYPE     WINDOWS
PROTMODE

CODE        MOVEABLE DISCARDABLE LOADONCALL
DATA        FIXED SINGLE PRELOAD

SEGMENTS
    _TEXT       FIXED                          PRELOAD
    WEP_TEXT    FIXED                          PRELOAD
    INIT        MOVEABLE    DISCARDABLE        PRELOAD
    COMMON      MOVEABLE    DISCARDABLE        PRELOAD
    MIXER       MOVEABLE    DISCARDABLE        PRELOAD
    WAVE        MOVEABLE    DISCARDABLE        PRELOAD

HEAPSIZE    2048

EXPORTS
            WEP               @1       RESIDENTNAME
            DriverProc        @2       RESIDENTNAME
            wodMessage        @3       RESIDENTNAME
            widMessage        @4       RESIDENTNAME
            auxMessage        @5       RESIDENTNAME
            mxdMessage        @6       RESIDENTNAME
 

The actual ordinal values you assign to each exported function are not significant, though each must be unique within the DLL.