home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / masm / masm5 / os2.doc < prev    next >
Encoding:
Text File  |  1988-08-11  |  33.0 KB  |  897 lines

  1.                         Calling OS/2 Macros
  2.  
  3. You can simplify calls of OS/2 systems services by using the macros.
  4. The OS/2 macros are organized into groups that can be enabled by
  5. including the file OS2.INC and defining constants associated with each
  6. group. For example, to enable file management macros, put the
  7. following lines in the source file where the macros will be used:
  8.  
  9. INCL_DOSFILEMGR EQU 1
  10. INCLUDE os2.inc
  11.  
  12. Note that the constant must be defined before the include file is
  13. specified. The groups of macros and the constants associated with each
  14. are described later in this file.
  15.  
  16. Macros have the name of the OS/2 call preceded by an at sign (@). For
  17. example, the macro to call the DosFindNext service is called
  18. @DosFindNext.
  19.  
  20. Parameters are passed to macros by listing them on the same line as
  21. the macro name in much the same way as in most high-level languages.
  22. For example, you could use the following lines to call the
  23. @DosFindNext macro:
  24.  
  25. dHandle   DW      -1            ; Directory handle
  26. dResult   FILEFINDBUF <>        ; Structure for results
  27. dlResult  EQU     $ - dResult   ;   length of result
  28. dCount    DW      1             ; Find one file at a time
  29.           .
  30.           .
  31.           .
  32.           @DosFindNext [dHandle], dResult, dlResult, dCount
  33.  
  34. When passing memory locations as arguments, you can specify the
  35. contents of the specified variable by enclosing it in brackets. In the
  36. command line above, the value of the word variable dHandle (-1) is
  37. passed as the first argument.
  38.  
  39. To pass the far address of a variable, give the argument without
  40. brackets. The addresses of dResult and dCount are passed in the
  41. command-line above. Note that dResult is defined as a structure of
  42. type FILEFINDBUF. The FILEFINDBUF structure is defined in the include
  43. file.
  44.  
  45. You can pass word values in registers or constants by listing them
  46. without brackets. For example, dlResult is a constant in the example.
  47. If the file handle were in register DX instead of in the variable
  48. dHandle, you could substitute the register name. You cannot pass
  49. doubleword constants. For example, to pass a doubleword zero, you must
  50. first store the value in a variable.
  51.  
  52. The macros do type checking. An error will be generated if you pass an
  53. argument of an invalid size or if you pass the wrong number of
  54. arguments. All arguments are expected to be word or doubleword values.
  55. Addresses are always far, and are thus passed as doublewords.
  56.  
  57. Note that the macros cannot check to see that you are actually passing
  58. an an address when required, since the macro has no way of knowing
  59. whether you are passing the address as a doubleword pointer variable
  60. or as a label specifying an address.
  61.  
  62. If you wish to pass a value stored in a byte variable or register, you
  63. must expand this value to a word before passing. For example, use CBW
  64. to expand a byte in AL to a word in AX.
  65.  
  66. Most valid operands can be passed as arguments. For example, the
  67. following are valid arguments:
  68.  
  69.     [es:[di]]               ; Contents of a word indirect memory operand
  70.     <[DWORD PTR es:[di]]>   ; Contents of a doubleword indirect memory operand
  71.     <SIZE var1>             ; A constant
  72.     es:table[bx]            ; Address of an indirect memory operand
  73.  
  74. Note that arguments containing spaces or tabs must be enclosed in
  75. angle brackets so that the macro will see them as a single argument.
  76.  
  77. The macros assume that DS=SS. If you change either of these registers
  78. temporarily, you should restore the register before passing arguments.
  79. The macros may change the contents of AX or BX, so you should save any
  80. important values in these registers before using an OS/2 macro.
  81.  
  82.                            OS/2 Call Summary
  83.  
  84. The OS/2 calls are listed below. The constant symbols associated with
  85. each group of macros are shown before the listings. The listings
  86. consist of the macro name followed by a one-line description. A second
  87. line shows the arguments expected by the macro. The following symbols
  88. are used to indicate the type of each argument:
  89.  
  90.     W     Word
  91.     D     Doubleword
  92.     PB    Pointer to byte
  93.     PW    Pointer to word
  94.     PD    Pointer to doubleword
  95.     PZ    Pointer to ASCIIZ string
  96.     PS    Pointer to structure
  97.  
  98. If the macro expects the address of a structure as one of its
  99. arguments, the structure will be listed below the argument line. See
  100. the include files for listings of structure fields. The include files
  101. also contain definitions for constants often passed to specific
  102. macros.
  103.  
  104. This document makes no attempt to explain the purpose or function of
  105. the OS/2 systems calls. The calls are described in detail in manuals
  106. published separately by Microsoft and in some third-party books and
  107. magazine articles.
  108.  
  109. The following macros are included unconditionally:
  110.  
  111.   @DosBeep - Generates sound from speaker
  112.   Parameters - Frequency:W, Duration:W
  113.  
  114.   @DosExit - Terminates a thread
  115.   Parameters - ActionCode:W, ResultCode:W
  116.  
  117. Named error number constant - INCL_ERRORS
  118.  
  119. Processes control constant - INCL_DOSPROCESS
  120.  
  121.   @DosCreateThread - Creates an asynchronous thread
  122.   Parameters - PgmAddress:D, ThreadID:PW, NewThreadStack:PB
  123.  
  124.   @DosResumeThread - Restarts a suspended thread
  125.   Parameters - ThreadID:W
  126.  
  127.   @DosSuspendThread - Suspends a thread
  128.   Parameters - ThreadID:W
  129.  
  130.   @DosCWait - Makes thread wait for child process to terminate
  131.   Parameters - ActionCode:W, WaitOption:W, ReturnCodes:PS, ProcessIDWord:PD,
  132.                ProcessID:W
  133.   Structure - RESULTCODES
  134.  
  135.   @DosSleep - Suspends current thread for specified interval
  136.   Parameters - Interval:D
  137.  
  138.   @DosEnterCritSec - Disables other threads
  139.   Parameters - none
  140.  
  141.   @DosExitCritSec - Reenables other threads
  142.   Parameters - none
  143.  
  144.   @DosExitList - Maintains list of routines to be executed when thread ends
  145.   Parameters - FnCode:W, RtnAddress:PW
  146.  
  147.   @DosExecPgm - Requests execution of a child program
  148.   Parameters - ObjNameBuf:PB, ObjNameBufL:W, AsyncTraceFlags:W, ArgPointer:PZ,
  149.                EnvPointer:PZ, ReturnCodes:PD, PgmPointer,PZ
  150.  
  151.   @DosGetPid - Gets process identification
  152.   Parameters - Pid:PS
  153.   Structure - PIDINFO
  154.  
  155.   @DosGetPrty - Returns the priority of a thread
  156.   Parameters - Scope:W, Priority:PW, ID:W
  157.  
  158.   @DosSetPrty - Sets the priority of a child process or thread
  159.   Parameters - Scope:W, PriorityClass:W, PriorityDelta:W, ID:W
  160.  
  161.   @DosKillProcess - Terminates a process and returns its termination code
  162.   Parameters - ActionCode:W, ProcessID:W
  163.  
  164. Information segment constant - INCL_DOSPROCESS
  165.  
  166.   @DosGetInfoSeg - Returns the addresses of the global and local segment
  167.   Parameters - GlobalSeg:PW, LocalSeg:PW
  168.   Structures - The returned segments contain the addresses of the GINFOSEG and
  169.                LINFOSEG structures
  170.  
  171. File management constant - INCL_DOSFILEMGR
  172.  
  173.   @DosOpen - Opens a file (creating it if necessary)
  174.   Parameters - FileName:PZ, Handle:PW, ActionTaken:PW, Size:D,
  175.                FileAttribute:W, OpenFlag:W, OpenMode:@, Reserved:D
  176.  
  177.   @DosClose - Closes a file handle
  178.   Parameters - FileHandle:W
  179.  
  180.   @DosRead - Reads bytes from a file to a buffer
  181.   Parameters - FileHandle:W, BufferArea:PB, BufferLength:W, ByteRead:PW
  182.  
  183.   @DosWrite - Writes bytes synchronously from a buffer to a file
  184.   Parameters - FileHandle:W, BufferAddress:PB, BufferLength:W, BytesWritten:PW
  185.  
  186.   @DosDelete - Deletes a file
  187.   Parameters - FileName:PZ, Reserved:D
  188.  
  189.   @DosDupHandle - Returns a new duplicate file handle for an open file
  190.   Parameters - OldFileHandle:W, NewFileHandle:PW
  191.  
  192.   @DosQFHandState - Gets the state of the specified file
  193.   Parameters - FileHandle:W, FileHandleState:PW
  194.  
  195.   @DosSetFHandState - Sets the state of a file
  196.   Parameters - FileHandle:W, FileHandleState:W
  197.  
  198.   @DosQHandType - Determines whether a handle references a file or a device
  199.   Parameters - FileHandle:W, HandType:PW, FlagWord:PW
  200.  
  201.   @DosReadAsync - Reads bytes from a file to a buffer asynchronously
  202.   Parameters - FileHandle:W, RamSemaphore:PD, ReturnCode:PW, BufferArea:PB,
  203.                BufferLength:W, BytesRead:PW
  204.  
  205.   @DosWriteAsync - Writes bytes asynchronously from a buffer to a file
  206.   Parameters - FileHandle:W, RamSemaphore:PD, ReturnCode:PW,
  207.                BufferAddress:PB, BufferLength:W, BytesWritten:PW
  208.  
  209.   @DosFindFirst - Finds the first directory entry matching a file specification
  210.   Parameters - FileName:PZ, DirHandle:PW, Attribute:W, ResultBuf:PS
  211.                ResultBufLen:W, SearchCount:PW, Reserved:D
  212.   Structure - FILEFINDBUF
  213.  
  214.   @DosFindNext - Finds the next directory entry matching a file specification
  215.   Parameters - DirHandle:W, ResultBuf:PS, ResultBufLen:W, SerachCount:PW
  216.   Structure - FILEFINDBUF
  217.  
  218.   @DosFindClose - Closes a directory search handle
  219.   Parameters - DirHandle:W
  220.  
  221.   @DosNewSize - Changes the size of a file
  222.   Parameters - FileHandle:W, Size:D
  223.  
  224.   @DosBufReset - Flushes a file buffer and updates directory information
  225.   Parameters - FileHandle:W
  226.  
  227.   @DosChgFilePtr - Moves the read/write pointer according to a specified method
  228.   Parameters - FileHandle:W, Distance:D, MoveType:W, NewPointer:PD
  229.  
  230.   @DosFileLocks - Locks or unlocks a range in an open file
  231.   Parameters - FileHandle:W, UnlockRange:PD, LockRange:PD
  232.  
  233.   @DosMove - Moves (or renames) a specified file
  234.   Parameters - OldFilename:PZ, NewFileName:PZ, Reserved:D
  235.  
  236.   @DosMkdir - Creates a directory
  237.   Parameters - DirName:PZ, Reserved:D
  238.  
  239.   @DosRmdir - Removes a subdirectory from a disk
  240.   Parameters - DirName:PZ, Reserved:D
  241.  
  242.   @DosSelectDisk - Selects a specified drive as the new default drive
  243.   Parameters - DriveNumber:W
  244.  
  245.   @DosQCurDisk - Returns the current drive
  246.   Parameters - DriveNumber:PW, LogicalDriveMap:PD
  247.  
  248.   @DosChdir - Changes to a specified directory
  249.   Parameters - DirName:PZ, Reserved:D
  250.  
  251.   @DosQCurDir - Retrieves the full path of the current directory
  252.   Parameters - DriveNumber:W, DirPath:PB, DirPathLen:PW
  253.  
  254.   @DosQFSInfo - Retrieves information from a file system device
  255.   Parameters - DriveNumber:W, FSInfoLevel:W, FSInfoBuf:PB, FSInfoBufSize:W
  256.   Structure - For GDInfoLevel 1, point FSInfoBuf to FSALLOCATE
  257.  
  258.   @DosSetFSInfo - Sets information for a file system device
  259.   Parameters - DriveNumber:W, FSInfoLevel:W, FSInfoBuf:PB, FSInfoBufSize:W
  260.  
  261.   @DosQVerify - Returns the value of the verify flag
  262.   Parameters - VerifySetting:PW
  263.  
  264.   @DosSetVerify - Sets the verify flag
  265.   Parameters - VerifySetting:W
  266.  
  267.   @DosSetMaxFH - Defines the maximum number of file handles
  268.   Parameters - NumberHandles:W
  269.  
  270.   @DosQFileInfo - Returns information about a file
  271.   Parameters - FileHandle:W, FileInfoLevel:W, FileInfoBuf:PB, FileInfoBufSize:B
  272.   Structure - At FileInfoLevel 1, can point FileInfoBuf to FILESTATUS
  273.  
  274.   @DosSetFileInfo - Specifies information for a file
  275.   Parameters - FileHandle:W, FileInfoLevel:W, FileInfoBuf:PB, FileInfoBufSize:W
  276.   Structure - At FileInfoLevel 1, can point FileInfoBuf to FILESTATUS
  277.  
  278.   @DosQFileMode - Retrieves the mode (attribute) of a file
  279.   Parameters - FileName:PZ, Attribute:PW, Reserved:D
  280.  
  281.   @DosSetFileMode - Changes the mode (attribute) of a file
  282.   Parameters - Filename:PZ, Attribute:W, Reserved:D
  283.  
  284.  
  285. Memory management constant - INCL_DOSMEMMGR
  286.  
  287.   @DosAllocSeg - Allocates a segment of memory
  288.   Parameters - Size:W, Selector:PW, AllocFlags:W
  289.  
  290.   @DosReallocSeg - Changes the size of an allocated segment
  291.   Parameters - Size:W, Selector:W
  292.  
  293.   @DosFreeSeg - Deallocates a segment
  294.   Parameters - Selector:W
  295.  
  296.   @DosGiveSeg - Gives another process access to a shared memory segment
  297.   Parameters - CallerSegHandle:W, ProcessID:W, RecipientSegHandle:PW
  298.  
  299.   @DosGetSeg - Gets access to a shared memory segment
  300.   Parameters - Selector:W
  301.  
  302.   @DosAllocHuge - Allocates memory potentially requiring multiple segments
  303.   Parameters - NumSeg:W, Size:W, Selector:PW, ShareInd:W, MaxNumSeg:W
  304.  
  305.   @DosReallocHuge - Changes memory amount previously allocated by DosAllocHuge
  306.   Parameters - NumSet:W, Size:W, Selector:W
  307.  
  308.   @DosGetHugeShift - Returns a shift count used to derive selectors to
  309.                      huge memory allocated with DosAllocHuge
  310.   Parameters - ShiftCount:PW
  311.  
  312.   @DosAllocShrSeg - Allocates a shared memory segment
  313.   Parameters - Size:W, Name:PZ, Selector:PW
  314.  
  315.   @DosLockSeg - Locks a discardable segment in memory
  316.   Parameters - Selector:W
  317.  
  318.   @DosUnlockSeg - Unlocks a discardable segment
  319.   Parameters - Selector:W
  320.  
  321.   @DosGetShrSeg - Allows a process to access a previously allocated shared
  322.                   memory segment and increments the segment reference count
  323.   Parameters - Name:PZ, Selector:PW
  324.  
  325.   @DosMemAvail - Returns the size of the largest block of free memory
  326.   Parameters - MemAvailSize:PD
  327.  
  328.   @DosCreateCSAlias - Creates an executable alias for a data type descriptor
  329.                       passed as input
  330.   Parameters - DataSelector:W, CodeSelector:PW
  331.  
  332.   @DosSubAlloc - Allocates memory from within a segment that was previously
  333.                  allocated and initialized with DosSubSet
  334.   Parameters - SegSelector:W, BlockOffset:PW, Size:W
  335.  
  336.   @DosSubFree - Frees memory previously allocated with DosSubAlloc
  337.   Parameters - SegSelector:W, BlockOffset:W, Size:W
  338.  
  339.   @DosSubSet - Initializes a segment for suballocation, or changes the size
  340.                of a previous suballocation
  341.   Parameters - SegSelector:W, BlockOffset:W, Size:W
  342.  
  343.  
  344. Semaphore constant - INCL_DOSSEMAPHORES
  345.  
  346.   @DosSemClear - Unconditionally clears a semaphore
  347.   Parameters - SemHandle:D
  348.  
  349.   @DosSemSet - Unconditionally sets a semaphore
  350.   Parameters - SemHandle:D
  351.  
  352.   @DosSemWait - Blocks current thread until a specified semaphore is cleared
  353.   Parameters - SemHandle:D, Timeout:D
  354.  
  355.   @DosSemSetWait - Sets a specified semaphore and blocks current thread
  356.                    until the semaphore is cleared
  357.   Parameters - SemHandle:D, Timeout:D
  358.  
  359.   @DosSemRequest - Obtains a semaphore
  360.   Parameters - SemHandle:D, Timeout:D
  361.  
  362.   @DosCreateSem - Creates a system semaphore
  363.   Parameters - NoExclusive:W, SemHandle:PD, SemName:PZ
  364.  
  365.   @DosOpenSem - Opens a semaphore and assigns it a handle
  366.   Parameters - SemHandle:PD, SemName:PZ
  367.  
  368.   @DosCloseSem - Closes a system semaphore
  369.   Parameters - SemHandle:D
  370.  
  371.   @DosMuxSemWait - Blocks the current thread until one or more specified
  372.                    semaphores is cleared
  373.   Parameters - IndexNum:PW, ListAddr:PS, Timeout:D
  374.   Structure - MUXSEMLIST (which contains MUXSEM structures)
  375.  
  376.  
  377. Date and time management constant - INCL_DOSDATETIME
  378.  
  379.   @DosGetDateTime - Gets the current date and time
  380.   Parameters - DateTime:PS
  381.   Structure - DATETIME
  382.  
  383.   @DosSetDateTime - Sets the date and time
  384.   Parameters - DateTime:PS
  385.   Structure - DATETIME
  386.  
  387.   @DosTimerAsync - Starts a timer that is asynchronous to the launching thread
  388.   Parameters - TimeInterval:D, SemHandle:D, Handle:PW
  389.  
  390.   @DosTimerStart - Starts a periodic interval timer
  391.   Parameters - TimeInterval:D, SemHandle:D, Handle:PW
  392.  
  393.   @DosTimerStop - Stops an interval or asynchronous timer
  394.   Parameters - Handle:W
  395.  
  396.  
  397. Module management constant - INCL_DOSMODULEMGR
  398.  
  399.   @DosLoadModule - Loads a dynamic-link module and assigns it a handle
  400.   Parameters - ObjNameBufAdd:PD, ObjNameBufL:W, ModuleName:PZ, ModuleHandle:PW
  401.  
  402.   @DosFreeModule - Frees a reference to a dynamic-link module
  403.   Parameters - ModuleHandle:W
  404.  
  405.   @DosGetProcAddr - Returns the far address of a procedure within a
  406.                     dynamic-link module
  407.   Parameters - ModuleHandle:W, ProcName:PZ, ProcAddress:PD
  408.  
  409.   @DosGetModHandle - Tests whether a specified dynamic-link module is loaded
  410.   Parameters - ModuleName:PZ, ModuleHandle:PW
  411.  
  412.   @DosGetModName - Returns the complete pathname of a specified module
  413.   Parameters - ModuleHandle:W, BufferLength:W, Buffer:PB
  414.  
  415.  
  416. Resource management constant - INCL_DOSRESOURCES
  417.  
  418.   @DosGetResource - Returns the selector of a specified resource segment
  419.   Parameters - ModHandle:W, TypeID:W, NameID:W, Selector:PW
  420.  
  421.  
  422. National language support constant - INCL_DOSNLS
  423.  
  424.   @DosGetCtryInfo - Obtains country-dependent formatting information
  425.   Parameters - Length:W, CountryCode:PS, MemoryBuffer:PS, DataLength:PW
  426.   Structures - COUNTTRYCODE, COUNTRYINFO
  427.  
  428.   @DosGetDBCSEv - Obtains the DBCS environmental vector from COUNTRY.SYS
  429.   Parameters - Length:W, CountryCode:PS, MemoryBuffer:PW
  430.   Structure - COUNTRYCODE
  431.  
  432.   @DosCaseMap - Does case mapping on an ASCII string
  433.   Parameters - Length:W, CountryCode:PS, String:PB
  434.   Structure - COUNTRYCODE
  435.  
  436.   @DosGetCollate - Obtains an ASCII collating sequence table from COUNTRY.SYS
  437.   Parameters - Length:W, CountryCode:PS, MemoryBuffer:PB, DataLength:PW
  438.   Structure - COUNTRYCODE
  439.  
  440.   @DosGetCp - Queries the current code page and the prepared system code pages
  441.   Parameters - Length:W, CodePageList:PW, DataLength:PW
  442.  
  443.   @DosSetCp - Sets the code page
  444.   Parameters - CodePage:W, Reserved:W
  445.  
  446.  
  447. Signal management constant - INCL_DOSSIGNALS
  448.  
  449.   @DosSetSigHandler - Establishes a signal handler
  450.   Parameters - RoutineAddress:D, PrevAddress:PD, PrevAction:PW, Action:W,
  451.                SigNumber:W
  452.  
  453.   @DosFlagProcess - Sets an external event flag on another process
  454.   Parameters - ProcessID:W, Action:W, FlagNum:W, FlagArg:W
  455.  
  456.   @DosHoldSignal - Temporarily enables or disables signal processing
  457.   Parameters - ActionCode:W
  458.  
  459.   @DosSendSignal - Sends a CTRL-C or CTRL-BREAK signal
  460.   Parameters - ProcessID:W, SigNumber:W
  461.  
  462.  
  463. Monitor management constant - INCL_DOSMONITORS
  464.  
  465.   @DosMonOpen - Initiates device monitoring and assigns a monitor handle
  466.   Parameters - DevName:PZ, Handle:PW
  467.  
  468.   @DosMonClose - Terminates device monitoring
  469.   Parameters - Handle:W
  470.  
  471.   @DosMonReg - Establishes input and output buffers to monitor an I/O stream
  472.   Parameters - Handle:W, BufferI:PB, BufferO:PB, PosFlag:W, Index:W
  473.  
  474.   @DosMonRead - Waits for and reads input from the monitor buffer
  475.   Parameters - BufferI:PB, WaitFlag:W, DataBuffer:PB, ByteCnt:PW
  476.  
  477.   @DosMonWrite - Writes data to the output buffer of a monitor
  478.   Parameters - BufferO:PB, DataBuffer:PB, ByteCnt:W
  479.  
  480.  
  481. Queue management constant - INCL_DOSQUEUES
  482.  
  483.   @DosMakePipe - Creates a pipe
  484.   Parameters - ReadHandle:PW, WriteHandle:PW, PipeSize:W
  485.  
  486.   @DosCloseQueue - Closes a queue
  487.   Parameters - QueueHandle:W
  488.  
  489.   @DosCreateQueue - Creates and opens a queue
  490.   Parameters - QueueHandle:PW, QueuePrt:W, QueueName:PZ
  491.  
  492.   @DosOpenQueue - Opens a queue
  493.   Parameters - OwnerPID:PW, QueueHandle:PW, QueueName:PZ
  494.  
  495.   @DosPeekQueue - Retrieves, but does not remove, a queue element
  496.   Parameters - QueueHandle:W, Request:PD, DataLength:PW, DataAddress:PD
  497.                ElementCode:PW, NowWait:W, ElemPriority:PB, SemHandle:D
  498.  
  499.   @DosPurgeQueue - Purges a queue of all elements
  500.   Parameters - QueueHandle:W
  501.  
  502.   @DosQueryQueue - Finds the size of (number of elements in) a queue
  503.   Parameters - QueueHandle:W, NumberElements:PW
  504.  
  505.   @DosReadQueue - Reads and removes an element from a queue
  506.   Parameters - QueueHandle:W, Request:PD, DataLength:PW, DataAddress:PD
  507.                ElementCode:W, NoWait:W, ElemPriority:PW, SemHandle:D
  508.  
  509.   @DosWriteQueue - Adds an element to a queue
  510.   Parameters - QueueHandle:W, Request:W, DataLength:W, DataBuffer:PB,
  511.                ElemPriority:W
  512.  
  513. Miscellaneous functions constant - INCL_DOSMISC
  514.  
  515.   @DosError - Enables OS/2 to receive hard-error notification without
  516.               generating a hard-error signal
  517.   Parameters - Flag:W
  518.  
  519.   @DosSetVec - Registers an address to be used when an exception occcurs
  520.   Parameters - VecNum:W, RoutineAddress:D, PrevAddress:PD
  521.  
  522.   @DosGetMessage - Retrieves a message from a message file and inserts
  523.                    variable information into the message
  524.   Parameters - IvTable:PD, IvCount:W, DataArea:PB, DataLength:W,
  525.                MsgNumber:W, FileName:PZ, MsgLength:PW
  526.  
  527.   @DosErrClass - Enables recognition and processing of error (exit) codes
  528.   Parameters - Code:W, Class:PW, Action:PW, Locus:PW
  529.  
  530.   @DosInsMessage - Inserts variable text string information into a message
  531.   Parameters - IvTable:PD, IvCount:W, MsgInput:PZ, MsgInLength:W,
  532.                DataArea:PW, DataLength:W, MsgLength:PW
  533.  
  534.   @DosPutMessage - Outputs a message from a buffer to a specified handle
  535.   Parameters - FileHandle:W, MessageLength:W, MessageBuffer:PB
  536.  
  537.   @DosGetEnv - Gets the segment of the environment string and the
  538.                offset within it of the command line
  539.   Parameters - EnvPointer:PW, CmdOffset:PW
  540.  
  541.   @DosScanEnv - Searches an environment segment for an environment variable
  542.   Parameters - EnvVarName:PZ, ResultPointer:PD
  543.  
  544.   @DosSearchPath - Enables applications to find files in specified directories
  545.   Parameters - Control:W, PathRef:PZ, Filename:PZ, ResultBuffer:PB,
  546.                ResultBufferLen:W
  547.  
  548.   @DosGetVersion - Gets the current DOS version
  549.   Parameters - VersionWord:PW
  550.  
  551.   @DosGetMachineMode - Tells whether the processor is in real or protected mode
  552.   Parameters - MachineMode:PB
  553.  
  554.  
  555. Session management constant - INCL_DOSSESMGR
  556.  
  557.   @DosStartSession - Starts a new session
  558.   Parameters - StartData:PS, SessID:PW, PID:PW
  559.   Structure - STARTDATA
  560.  
  561.   @DosSetSession - Sets status of a child process
  562.   Parameters - SessID:W, StatusData:PS
  563.   Structure - STATUSDATA
  564.  
  565.   @DosSelectSession - Enables a parent process to switch a child to foreground
  566.   Parameters - SessID,W, Reserved:D
  567.  
  568.   @DosStopSession - Terminates session previously started with DosStartSession
  569.   Parameters - TargetOption:W, SessID:W, Reserved:D
  570.  
  571.  
  572. Device driver constant - INCL_DOSDEVICES
  573.  
  574.   @DosDevConfig - Gets information about attached devices
  575.   Parameters - DeviceInfo:PB, Item:W, Parameter:W
  576.  
  577.   @DosDevIOCtl - Performs control functions on a specified device
  578.   Parameters - Data:PB, ParmList:PB, Function:W, Category:W, Handle:W
  579.  
  580.   @DosSystemService - Requests a special function from the system
  581.   Parameters - ServiceCategory:W, RequestPacket:PB, ResponsePacket:PB
  582.  
  583.   @DosCLIAccess - Requests privilege to disable (CLI) or enable (STI) interrupts
  584.   Parameters - None
  585.  
  586.   @DosPortAccess - Requests or releases privilege for I/O port access
  587.   Parameters - Reserved:W, TypeOfAccess:W, FirstPort:W, LastPort:W
  588.  
  589.   @DosPhysicalDisk - Obtains information on partitionable disks
  590.   Parameters - Function:W, DataPtr:D, DataLength:W, ParmPtr:D, ParmLength:W
  591.  
  592.  
  593. Keyboard input constant - INCL_KBD
  594.  
  595.   @KbdRegister - Registers a keyboard subsystem within a screen group
  596.   Parameters - ModuleName:PZ, EntryPoint:PZ, FunctionMask:D
  597.  
  598.   @KbdCharIn - Returns a character/scan code from the keyboard
  599.   Parameters - CharData:PS, IOWait:W, KbdHandle:W
  600.   Structure - KBDKEYINFO
  601.  
  602.   @KbdPeek - Returns a character and scan code, if available, without
  603.              removing it from the keystroke buffer
  604.   Parameters - CharData:PS, KbdHandle:W
  605.   Structure - KBDKEYINFO
  606.  
  607.   @KbdStringIn - Reads a character string from the keyboard
  608.   Parameters - CharBuffer:PB, Length:PS, IOWait:W, KbdHandle:W
  609.   Structure - STRINGINBUF
  610.  
  611.   @KbdFlushBuffer - Clears the keystroke buffer
  612.   Parameters - KbdHandle:W
  613.  
  614.   @KbdSetStatus - Sets the characteristics of the keyboard
  615.   Parameters - Structure:PS, KbdHandle:W
  616.   Structure - KBDINFO
  617.  
  618.   @KbdGetStatus - Gets status information about the keyboard
  619.   Parameters - Structure:PS, KbdHandle:W
  620.   Structure - KBDINFO
  621.  
  622.   @KbdOpen - Creates a new logical keyboard
  623.   Parameters - KbdHandle:PW
  624.  
  625.   @KbdClose - Ends a logical keyboard
  626.   Parameters - KbdHandle:W
  627.  
  628.   @KbdSetCp - Sets the code page identifier for a logical keyboard
  629.   Parameters - Reserved:W, CodePageID:W, KbdHandle:W
  630.  
  631.   @KbdGetCp - Retrieves the code page identifier for the logical keyboard
  632.   Parameters - Reserved:D, CodePageID:PW, KbdHandle:W
  633.  
  634.   @KbdGetCp - Ends a logical keyboard
  635.   Parameters - KbdHandle:W
  636.  
  637.   @KbdFreeFocus - Frees the logical-to-physical bond created by KbdGetFocus
  638.   Parameters - KbdHandle:W
  639.  
  640.   @KbdGetFocus - Binds the logical keyboard to the physical keyboard
  641.   Parameters - IOWait:W, KbdHandle:W
  642.  
  643.   @KbdSynch - Synchronizes access to the keyboard subsystem
  644.   Parameters - IOWait:W
  645.  
  646.   @KbdXlate - Translates a scan code and its shift states into an ASCII code
  647.   Parameters - XlateRecord:PS, KbdHandle:W
  648.   Structure - KBDTRANSLATE
  649.  
  650.   @KbdSetCustXt - Installs a custom translate table for the logical keyboard
  651.   Parameters - CodePage:PW, KbdHandle:W
  652.  
  653.  
  654. Video output constant - INCL_VIO
  655.  
  656.   @VioRegister - Registers a video subsystem within a screen group
  657.   Parameters - ModuleName:PZ, EntryPoint:PZ, FunctionMask1:D, FunctionMask2:D
  658.  
  659.   @VioDeRegister - Derestisters a previously registered video subsystem
  660.   Parameters - None
  661.  
  662.   @VioGetBuf - Returns the address of the logical video buffer
  663.   Parameters - LVBPtr:PD, Length:PW, VioHandle:W
  664.  
  665.   @VioGetCurPos - Returns the cursor position
  666.   Parameters - Row:PW, Column:PW, VioHandle:W
  667.  
  668.   @VioSetCurPos - Sets the cursor position
  669.   Parameters - Row:W, Column:W, VioHandle:W
  670.  
  671.   @VioGetCurType - Returns the cursor type
  672.   Parameters - CursorData:PS, VioHandle:W
  673.   Structure - VIOCURSORINFO
  674.  
  675.   @VioSetCurType - Sets the cursor type
  676.   Parameters - CursorData:PS, VioHandle:W
  677.   Structure - VIOCURSORINFO
  678.  
  679.   @VioGetMode - Returns display mode information
  680.   Parameters - ModeData:PS, VioHandle:W
  681.   Structure - VIOMODEINFO
  682.  
  683.   @VioSetMode - Sets the display mode
  684.   Parameters - ModeData:PS, VioHandle:W
  685.   Structure - VIOMODEINFO
  686.  
  687.   @VioGetPhysBuf - Returns the address of the physical video buffer
  688.   Parameters - Structure:PS, Reserved:W
  689.   Structure - VIOPHYSBUF
  690.  
  691.   @VioReadCellStr - Reads a string of character-attributes (cells) from screen
  692.   Parameters - CellStr:PW, Length:PW, Row:W, Column:W, VioHandle:W
  693.  
  694.   @VioReadCharStr - Reads a string of characters from screen
  695.   Parameters - CharStr:PB, Length:PW, Row:W, Column:W, VioHandle:W
  696.  
  697.   @VioWrtCellStr - Writes a string of character-attributes (cells) to screen
  698.   Parameters - CellStr:PB, Length:W, Row:W, Column:W, VioHandle:W
  699.  
  700.   @VioWrtCharStr - Writes a string of characters to screen
  701.   Parameters - CharStr:PB, Length:W, Row:W, Column:W, VioHandle:W
  702.  
  703.  
  704.   @VioScrollDn - Scrolls the current screen down
  705.   Parameters - TopRow:W, LeftCol:W, BotRow:W, RightCol:W, Lines:W
  706.                Cell:PW, VioHandle:W
  707.  
  708.   @VioScrollUp - Scrolls the current screen up
  709.   Parameters - TopRow:W, LeftCol:W, BotRow:W, RightCol:W, Lines:W
  710.                Cell:PW, VioHandle:W
  711.  
  712.   @VioScrollLf - Scrolls the current screen left
  713.   Parameters - TopRow:W, LeftCol:W, BotRow:W, RightCol:W, Lines:W
  714.                Cell:PW, VioHandle:W
  715.  
  716.   @VioScrollRt - Scrolls the current screen right
  717.   Parameters - TopRow:W, LeftCol:W, BotRow:W, RightCol:W, Lines:W
  718.                Cell:PW, VioHandle:W
  719.  
  720.   @VioWrtNAttr - Writes an attribute to the screen a specified number of times
  721.   Parameters - Attr:PB, Times:W, Row:w, Column:W, VioHandle:W
  722.  
  723.   @VioWrtNCell - Writes a character-attribute (cell) to the screen
  724.                  a specified number of times
  725.   Parameters - Cell:PW, Times:W, Row:w, Column:W, VioHandle:W
  726.  
  727.   @VioWrtNChar - Writes a character to the screen a specified number of times
  728.   Parameters - Char:PB, Times:W, Row:w, Column:W, VioHandle:W
  729.  
  730.   @VioWrtTTy - Writes a character string from the current cursor position
  731.   Parameters - CharString:PB, Length:W, VioHandle:W
  732.  
  733.   @VioWrtCharStrAtt - Writes a string of characters with a repeated
  734.                       attribute to screen
  735.   Parameters - CharStr:PB, Length:W, Row:W, Column:W, Attr:PB, VioHandle:W
  736.  
  737.  
  738.   @VioShowBuf - Updates the physical display with the logical video buffer
  739.   Parameters - Offset:W, Length:W, VioHandle:W
  740.  
  741.   @VioSetAnsi - Activates or deactivates ANSI support
  742.   Parameters - Indicator:W, VioHandle:W
  743.  
  744.   @VioGetAnsi - Returns the current ANSI state (on or off)
  745.   Parameters - Indicator:PW, VioHandle:W
  746.  
  747.   @VioPrtSc - Copies the contents of the screen to the printer
  748.   Parameters - VioHandle:W
  749.  
  750.   @VioPrtScToggle - Toggles whether session manager input is sent to printer
  751.   Parameters - VioHandle:W
  752.  
  753.   @VioSavRedrawWait - Notifies a process that it must save or redraw its screen
  754.   Parameters - SavRedrawIndic:W, NotifyType:PW, VioHandle:W
  755.  
  756.   @VioSavRedrawUndo - Cancels a VioSavRedrawWait issued by another thread
  757.                       within the same process
  758.   Parameters - OwnerIndic:W, KillIndic:W, VioHandle:W
  759.  
  760.   @VioModeWait - Notifies a graphics application that it must restore its
  761.                  video mode
  762.   Parameters - RequestType:W, NotifyType:PW, Reserved:W
  763.  
  764.   @VioModeUndo - Enables one thread within a process to cancel a VioModeWait
  765.                  issued by another thread in the same process
  766.   Parameters - OwnerIndic:W, KillIndic:W, Reserved:W
  767.  
  768.   @VioScrLock - Locks the screen for I/O
  769.   Parameters - WaitFlag:W, Status:PB, VioHandle:W
  770.  
  771.   @VioScrUnLock - Unlocks the screen for I/O
  772.   Parameters - VioHandle:W
  773.  
  774.   @VioPopUp - Requests a temporary screen to display a message
  775.   Parameters - WaitFlags:PW, VioHandle:W
  776.  
  777.   @VioEndPopUp - Releases a temporary screen obtained from a previous VioPopUp
  778.   Parameters - VioHandle:W
  779.  
  780.   @VioGetConfig - Returns the configuration of the video display
  781.   Parameters - Reserved:W, ConfigData:PS, VioHandle:W
  782.   Structure - VIOCONFIGINFO
  783.  
  784.   @VioGetFont - Returns either the font table of the specified size, or the
  785.                 font currently in use
  786.   Parameters - RequestBlock:PS, VioHandle:W
  787.   Structure - VIOFONTINFO
  788.  
  789.   @VioSetFont - Downloads a display font
  790.   Parameters - RequestBlock:PS, VioHandle:W
  791.   Structure - VIOFONTINFO
  792.  
  793.   @VioGetCp - Returns the code page being used by the specified handle
  794.   Parameters - Reserved:W, CodePageID:PW, VioHandle:W
  795.  
  796.   @VioSetCp - Sets the code page to be used by the specified handle
  797.   Parameters - Reserved:W, CodePageID:W, VioHandle:W
  798.  
  799.   @VioGetState - Returns the current setting of either the palette registers,
  800.                  overscan (border) color, or blink/background intensity switch
  801.   Parameters - RequestBlock:PS, VioHandle:W
  802.   Structures - VIOPALSTATE, VIOOVERSCAN, or VIOINTENSITY
  803.  
  804.   @VioSetState - Sets either the palette registers, overscan (border) color,
  805.                  or blink/background intensity switch
  806.   Parameters - RequestBlock:PS, VioHandle:W
  807.   Structures - VIOPALSTATE, VIOOVERSCAN, or VIOINTENSITY
  808.  
  809.  
  810. Mouse input constant - INCL_MOU
  811.  
  812.   @MouRegister - Registers a mouse subsystem or environment manager
  813.   Parameters - ModuleName:PZ, EntryName:PZ, Mask:D
  814.  
  815.   @MouDeRegister - Deregisters a mouse subsystem or environment manager
  816.   Parameters - None
  817.  
  818.   @MouFlushQue - Flushes the mouse event queue
  819.   Parameters - DeviceHandle:W
  820.  
  821.   @MouGetHotKey - Queries to determine which physical key (button) is the 
  822.                   system hot key
  823.   Parameters - ButtonMask:PW, DeviceHandle:W
  824.  
  825.   @MouSetHotKey - Tells the mouse driver which physical key (button) is 
  826.                   the system hot key
  827.   Parameters - ButtonMask:PW, DeviceHandle:W
  828.  
  829.   @MouGetPtrPos - Gets the coordinates (row and column) of the mouse pointer 
  830.   Parameters - PtrPos:PS, DeviceHandle:W
  831.   Structure - PTRLOC
  832.  
  833.   @MouSetPtrPos - Sets new coordinates for the mouse pointer image 
  834.   Parameters - PtrPos:PS, DeviceHandle:W
  835.   Structure - PTRLOC
  836.  
  837.   @MouSetPtrShape - Sets the shape and size for the mouse pointer image 
  838.   Parameters - PtrBuffer:PB, PtrDefRec:PS, DeviceHandle:W
  839.   Structure - PTRSHAPE
  840.  
  841.   @MouGetPtrShape - Copies the pointer shape for the screen group 
  842.   Parameters - PtrBuffer:PB, PtrDefRec:PS, DeviceHandle:W
  843.   Structure - PTRSHAPE
  844.  
  845.   @MouGetDevStatus - Returns the status flags for the mouse device driver 
  846.   Parameters - DeviceStatus:PW, DeviceHandle:W
  847.  
  848.   @MouGetNumButtons - Returns the number of buttons 
  849.   Parameters - NumberOfButtons:PW, DeviceHandle:W
  850.  
  851.   @MouGetNumMickeys - Returns the number of mickeys per centimeter 
  852.   Parameters - NumberOfMickeys:PW, DeviceHandle:W
  853.  
  854.   @MouReadEventQue - Reads an event from the pointing device event queue 
  855.                      into the mouse event queue
  856.   Parameters - Event:PS, NoWait:PW, DeviceHandle:W
  857.   Structure - MOUEVENTINFO
  858.  
  859.   @MouGetNumQueEl - Returns the status for the event queue 
  860.   Parameters - QueDataRecord:PS, DeviceHandle:W
  861.   Structure - MOUQUEINFO
  862.  
  863.   @MouGetEventMask - Returns an event mask for the current pointing device 
  864.   Parameters - EventMask:PW, DeviceHandle:W
  865.  
  866.   @MouSetEventMask - Assigns a new event mask to the current pointing device 
  867.   Parameters - EventMask:PW, DeviceHandle:W
  868.  
  869.   @MouGetScaleFact - Gets scaling factors for the current pointing device 
  870.   Parameters - ScaleStruct:PS, DeviceHandle:W
  871.   Structure - SCALEFACT
  872.  
  873.   @MouSetScaleFact - Assigns scaling factors for the current pointing device 
  874.   Parameters - ScaleStruct:PS, DeviceHandle:W
  875.   Structure - SCALEFACT
  876.  
  877.   @MouOpen - Opens the mouse device for the current screen group 
  878.   Parameters - DriverName:PZ, DeviceHandle:PW
  879.  
  880.   @MouClose - Closes the mouse device for the current screen group
  881.   Parameters - DeviceHandle:W
  882.  
  883.   @MouRemovePtr - Notifies the mouse device dirver that a specified area is 
  884.                   for the exclusive use of the application
  885.   Parameters - PtrArea:PS, DeviceHandle:W
  886.   Structure - NOPTRRECT
  887.  
  888.   @MouDrawPtr - Releases an area previously restricted to the pointer
  889.                 image for use by the mouse device driver
  890.   Parameters - DeviceHandle:W
  891.  
  892.   @MouSetDevStatus - Sets the pointing device driver status flags 
  893.   Parameters - DeviceStatus:PW, DeviceHandle:W
  894.  
  895.   @MouInitReal - Initializes the real-mode mouse device driver 
  896.   Parameters - DriverName:PZ
  897.