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.
Writing Extensions
                                             ◄Up► ◄Contents► ◄Index► ◄Back►
─────PWB Extensions─────────────────────────────────────────────────────────
 
     To create a PWB extension written in C, follow these guidelines:
 
       1. Include the file EXT.H. This file defines the functions,
          types, and constants used in extensions.
 
       2. Every extension must define the following objects:
 
          Object           Description
 
          ◄swiTable►       Table of switch structurs
          ◄cmdTable►       Table of function structurs
          ◄WhenLoaded►     Initialization function executed when
                           PWB loads the extension
 
       3. Use the required return type and arguments for all extension
          functions. Make sure you process all accepted argument forms
          and return meaningful values.
          See: ◄Writing Extension Functions►
 
       4. Use the PWB extension callbacks for processing PWB data such
          as files, windows, colors, and text. Use C run-time functions
          for processing general data, such as strings and buffers.
          See: ◄Extension Functions (Alphabetical List)►
               ◄Extension Functions (by Category)►
               ◄Calling C Run-Time Functions►
 
       5. Compile and link the extension module.
          See: ◄Building PWB Extensions►
 
       6. Load the extension into PWB, and test it.
          See: ◄Loading Extension Modules►
 
          To manually load an extension, type:
 
               Arg "load:<extension>" Assign
               «Arg» load:<extension> «Assign»
 
     See
 
     ◄Example Extensions►
                                    -♦-