### STUB Module Definition Statement

Syntax: | Parameters:
`STUB` 'filename' | Name of file to add

Use the `STUB` statement to add a DOS .EXE file to the beginning of your .EXE or .DLL. The stub function is then invoked whenever your .EXE or .DLL file is run under DOS. Typically, the stub displays the message that the program cannot run in DOS mode, and ends the program.

If you do not use the `STUB` statement, the linker adds its own standard stub for this purpose.

The linker searches for the filename you specify as the stub as follows:

1. In the directory you specify, or in the current directory if you did not give a path
2. In the directories listed in the `PATH` environment variable

The following example adds the DOS .EXE file STOPIT.EXE to the beginning of the file you are creating. STOPIT.EXE runs whenever your file is run under DOS.

    STUB 'STOPIT.EXE'

Summary of Module Definition Statements