Windows 3.1 Device Drivers (ddag31qh.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.
Standard-Function Dispatch Table
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
Since a display grabber is a binary-image file, the grabber cannot export
its standard functions. To give Windows access to the functions, the grabber
includes a standard-function dispatch table, consisting of a series of jump
instructions, at the start (offset 0) of its code segment. There is one
3-byte jump instruction for each grabber function. Windows transfers control
to a grabber function by computing the offset of the desired function's
dispatch table entry and by making a FAR call to that entry. Although each
dispatch table entry is a NEAR jump instruction to the corresponding
function, the function itself must execute a FAR return instruction when it
returns to Windows.
 
The standard-function dispatch table has the following form:
 
        org 0
 
StdFuncTable label word
        jmp     InquireGrab     ;function 00001h
        jmp     Obsolete        ;function 00002h
        jmp     Obsolete        ;function 00003h
        jmp     Obsolete        ;function 00004h
        jmp     InquireSave     ;function 00005h
        jmp     SaveScreen      ;function 00006h
        jmp     RestoreScreen   ;function 00007h
        jmp     InitScreen      ;function 00008h
 
The grabber must not modify or move the dispatch table after it has been
loaded.
 
The dispatch-table entry for the InitScreen function, an optional function,
is at offset 015h. Windows checks for a jump instruction at offset 015h to
determine whether the InitScreen function is present. If InitScreen is
present, Windows calls the function whenever a non-Windows application
starts up, and subsequently after every video-context switch to that
application.
 
 
                                      ♦