LINK Help (linkx.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
STUB Statement
                                             Up Contents Index Back
─────STUB Statement─────────────────────────────────────────────────────────
 
     Syntax:  STUB {'filename' | NONE}
 
     This statement adds a DOS executable file to the beginning of an
     OS/2 or Windows application or DLL. The stub is invoked whenever
     the file is executed under DOS. Usually, the stub displays a
     message and terminates execution. By default, LINK adds a standard
     stub for this purpose. Use the STUB statement when creating a
     dual-mode program.
     See: How to Build a Dual-Mode Program (in BIND Help)
 
     The <filename> specifies the DOS file to be added. LINK looks for
     <filename> in the current directory and then in directories
     specified with the PATH environment variable. The <filename> must
     be enclosed in single or double quotation marks (' or ").
 
     The alternate specification NONE prevents LINK from adding a
     default stub. This saves space in the application or DLL, but the
     resulting file will hang the system if loaded in DOS.
 
     Example
 
          STUB 'STOPIT.EXE'
 
     This example inserts the DOS executable file STOPIT.EXE at the
     beginning of the application or DLL. STOPIT.EXE is executed when
     the application or DLL is run under DOS.
                                    -♦-