PWB Extensions Help (ext.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.
Compiling and Linking Extensions
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
     All extensions must be compiled to meet the following conditions.
     Once you understand the requirements, you can vary the compiler
     command line.
 
     Condition                           CL Options
 
     No stack checking                   /Gs
     DS does not equal SS                /Aw or /Au
     Default data must be far            /Af
     Default code may be far or near     /As or /Al
 
     Extension functions must be far and have far data pointers. They
     must reload DS on entry. The prototypes in EXT.H enforce this for
     the callback functions. If your internal functions need to load DS,
     use the /Afsu custom memory-model option instead of /Afsw.
 
     It is possible to write small-model extensions despite the
     requirement that data be far. You must cast all data references
     between the PWB and the extension from near to far. Internal data
     references can be near.
 
     The link step varies depending on the contents of your extensions.
     Link with either the compact-model or the large-model library.
     Compiling with /ACw (equivalent to /Afsw) specifies the
     compact-model library; /ALw (/Aflw) specifies the large-model
     library.
                                    -♦-