Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> using dlls with the dos extender</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Using DLLs with the DOS extender
------------------------------------------------------------------------------
 In order to fully understand the concept and application of DLLs (Dynamic
 Link Libraries) please read the section entitled `Dynamic linking and DLLs'
 in Chapter 4. This section contains a detailed explanation of how dynamic
 linking and DLLs work and the corresponding implications to the programmer.
 It also discusses the potential benefits and detriments of using DLLs within
 an application.

 DLLs can only be used with Extended mode programs, they will not work with
 Dual mode programs as there is insufficient memory in real mode and the DLL
 loading mechanism is not compatible with real mode. The extender loads and
 executes standard Windows 3.x DLLs, so DLLs used with a DOS extended program
 have exactly the same requirements and restrictions as Windows DLLs in terms
 of the types of code which may or may not be placed in them.

 Up to 32 DLLs per program are supported, including DLLs which are called by
 other DLLs. In addition to the file handle required for the .EXE file, one
 file handle is required for each DLL, even if the code in the DLL is never
 accessed. The DOS extender automatically increases the file handle table to
 255 before switching to protected mode, so the maximum allowable number of
 files will depend on the settings in the CONFIG.SYS and network
 configuration files.

 At run time the DOS extender looks for DLLs required by the application in
 the following locations:

 . In the directory from which the main .EXE was loaded (the load path).
 . In the current directory.
 . In the PATH environment variable paths.

 If they cannot be found in any of these locations then the program will
 terminate with a Blinker 1302 run time error. If they are found, but do not
 contain the correct number and type of export definitions, then the program
 will terminate with a Blinker 1319 or 1320 run time error.

 Once all the required DLLs have been located, the application will start
 execution. Segments from the DLLs will be loaded on demand as they are
 accessed for the first time, in the same way as for the main .EXE. Once a
 segment is loaded, the resources it uses will remain active until the
 program terminates, although in low memory situations it may be swapped to
 disk by the extender if it has not been accessed recently.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson