API Function Calls: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
Created page with "By Bill Earle The following information describes the OS/2 Application Program Interface (API) calls. I have included information under the API column as follows:..."
 
Jugbogdan (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
By [[Bill Earle]]
''By [[Bill Earle]]''


The following information describes the OS/2 Application Program Interface (API) calls. I have included information under the API column as follows:                                                                                                              
The following information describes the OS/2 Application Program Interface (API) calls. I have included information under the API column as follows:
                                                                                                                                 
;F : is a Family API (FAPI) call. This means that this call will also run under DOS 3.3, if assembled with the BIND program.
; F : is a Family API (FAPI) call. This means that this call will also run under DOS 3.3, if assembled with the BIND program.                                                                        
;R : means Restricted function. Refer to the OS/2 Technical Reference Manual for further info.
                                                                                                                                 
I also have attempted to provide information to assist in porting old programs over to OS/2. INT and SUBCODE columns provide the old DOS interrupt and subcode functions. In some cases, these are approximations of old DOS calls. Again, refer to the OS/2 Technical Reference Manual for further information.
; R : means Restricted function. Refer to the OS/2 Technical Reference Manual for further info.                                                                                                      
 
                                                                                                                                 
{|class="wikitable"
I also have attempted to provide information to assist in porting old programs over to OS/2. INT and SUBCODE columns provide the old DOS interrupt and subcode functions. In some cases, these are approximations of old DOS calls. Again, refer to the OS/2 Technical Reference Manual for further information.                                                                                                        
!API||INT||SUBCODE||FUNCTION||DESCRIPTION
                                                                                                                                 
|-
API INT SUBCODE FUNCTION         DESCRIPTION                                                                                  
|F|| || ||BadDynLink||Called on bad dynamic link
F                 BadDynLink       Called on bad dynamic link                                                                  
|-
R                 DosAllocHuge     Allocate memory greater than one                                                            
|R|| || ||DosAllocHuge||Allocate memory greater than one segment
                                    segment                                                                                     
|-
R   21H 48H     DosAllocSegment Allocate a segment of memory                                                                
|R||21H||48H||DosAllocSegment||Allocate a segment of memory
                  Dos AllocShrSeg  Allocate a shared-memory segment. The                                                        
|-
                                    segment returned has a name that                                                            
| || || ||DosAllocShrSeg||Allocate a shared-memory segment. The segment returned has a name that each process can access.
                                    each process can access.                                                                    
|-
F                 DosBeep         Generate a sound frequency for the                                                          
|F|| || ||DosBeep||Generate a sound frequency for the specified duration
                                    specified duration                                                                          
|-
    21H 0DH,68H DosBufReset     Flush the disk buffers for the                                                              
| ||21H||0DH,68H||DosBufReset||Flush the disk buffers for the requesting process
                                    requesting process                                                                          
|-
F                 DosCaseMap       Map a binary string into an ASCII                                                            
|F|| || ||DosCaseMap||Map a binary string into an ASCII string by using a DOS code-page
                                    string by using a DOS code-page                                                              
|-
F   21H 3BH     DosChdir         Set the current directory                                                                    
|F||21H||3BH||DosChdir||Set the current directory
F   21H 42H     DosChgFilePtr   Move a file's read/write pointer                                                            
|-
F                 DosCLIAccess     Request CLI/STI privilege before                                                            
|F||21H||42H||DosChgFilePtr||Move a file's read/write pointer
                                    performing IN/OUT operations.                                                                
|-
F   21H 3EH     DosClose         Close the file associated with the                                                          
|F|| || ||DosCLIAccess||Request CLI/STI privilege before performing IN/OUT operations.
                                    specified file handle                                                                        
|-
                  DosCloseQueue   Close the queue specified for use by                                                        
|F||21H||3EH||DosClose||Close the file associated with the specified file handle
                                    the calling process                                                                          
|-
                  DosCloseSem     Close the semaphore specified for use                                                        
| || || ||DosCloseQueue||Close the queue specified for use by the calling process
                                    by the calling process                                                                      
|-
F                 DosCreateCSAlias Create an executable alias descriptor                                                        
| || || ||DosCloseSem||Close the semaphore specified for use by the calling process
                                    (second name) for the data type                                                              
|-
                                    descriptor received                                                                          
|F|| || ||DosCreateCSAlias||Create an executable alias descriptor (second name) for the data type descriptor received
                  DosCreateQueue   Create and open the queue specified                                                          
|-
                                    for use by the calling process                                                              
| || || ||DosCreateQueue||Create and open the queue specified for use by the calling process
                  DosCreatSem     Create a semaphore for use by the                                                            
|-
                                    calling process                                                                              
| || || ||DosCreatSem||Create a semaphore for use by the calling process
                  DosCreateThread Create an asynchronous execution                                                            
|-
                                    thread for the calling process.                                                              
| || || ||DosCreateThread||Create an asynchronous execution thread for the calling process. Threads are the OS/2 CPU scheduling entities.
                                    Threads are the OS/2 CPU scheduling                                                          
|-
                                    entities.                                                                                    
|R||21H||4DH||DosCWait||Wait for a child process termination and get return code
R   21H 4DH     DosCWait         Wait for a child process termination                                                        
|-
                                    and get return code                                                                          
|F||21H||41H||DosDelete||Delete the file specified by the ASCIIZ name.
F   21H 41H     DosDelete       Delete the file specified by the                                                            
|-
                                    ASCIIZ name.                                                                                
|F|| || ||DosDevConfig||Return device information about attached devices
F                 DosDevConfig     Return device information about                                                              
|-
                                    attached devices                                                                            
|F||21H||44H||DosDevIOCtl||Communicate with an opened device handle
F   21H 44H     DosDevIOCtl     Communicate with an opened device                                                            
|-
                                    handle                                                                                       
|F||21H||45H,46H||DosDupHandle||Return a duplicate DOS handle for the file handle provided
F   21H 45H,46H DosDupHandle     Return a duplicate DOS handle for the                                                        
|-
                                    file handle provided                                                                        
| || || ||DosEnterCritSec||Mark the entrance of a critical section of code and prevent the execution of other threads of code in the same process for concurrent processing synchronization
                  DosEnterCritSec Mark the entrance of a critical                                                              
|-
                                    section of code and prevent the                                                              
|R|| || ||DosError||Allow the calling process to receive OS/2 hard-error notification as Opposed to the OS/2 generation of a hard-error signal
                                    execution of other threads of code in                                                        
|-
                                    the same process for concurrent                                                              
|R||21H||59H||DosErrorClass||Get extended error information.
                                    processing synchronization                                                                  
|-
R                 DosError         Allow the calling process to receive                                                        
|R||21H||4BH||DosExecPgm||Spawn a secondary program as a child process
                                    OS/2 hard-error notification as                                                              
|-
                                    Opposed to the OS/2 generation of a                                                          
|R||21H||00H,4CH||DosExit||Complete the current thread of information
                                    hard-error signal                                                                            
|-
R   21H 59H     DosErrorClass   Get extended error information.                                                              
| || || ||DosExitCritSec||Mark the end of a critical section of code and enable other threads within the current process to execute again in a concurrent fashion
R   21H 4BH     DosExecPgm       Spawn a secondary program as a child                                                        
|-
                                    process                                                                                     
| || || ||DosExitList||Maintain the list (add,delete,modify) of routines that the current process is to execute upon completion
R   21H 00H,4CH DosExit         Complete the current thread of                                                              
|-
                                    information                                                                                 
|R||21H||5CH||DosFileLock||Lock or unlock a range of bytes within a file in support of file-sharing operations
                  DosExitCritSec   Mark the end of a critical section of                                                        
|-
                                    code and enable other threads within                                                        
|R|| || ||DosFindClose||Close the handle associated with the file returned by a DosFindNext API service
                                    the current process to execute again                                                        
|-
                                    in a concurrent fashion                                                                      
|R||21H||4EH||DosFindFirst||Find the first file in a group of files matching the file specification provided
                  DosExitList     Maintain the list (add,delete,modify)                                                        
|-
                                    of routines that the current process                                                        
|R||21H||4FH||DosFindNext||Find the next file in a group of files matching the file specification provided in the call to DosFindFirst
                                    is to execute upon completion                                                                
|-
R   21H 5CH     DosFileLock     Lock or unlock a range of bytes within                                                      
| || || ||DosFlagProcess||Set an external event flag that other processes can access for synchronization of concurrent processes
                                    a file in support of file-sharing                                                            
|-
                                    operations                                                                                   
| || || ||DosFreeModule||Release the link to the dynamic link module specified by the module handle.
R                 DosFindClose     Close the handle associated with the                                                        
 
                                    file returned by a DosFindNext API                                                          
This service decrements the usage for the specified module
                                    service                                                                                     
|-
R   21H 4EH     DosFindFirst     Find the first file in a group of                                                            
|F||21H||49H||DosFreeSeg||Release a previously allocated memory segment
                                    files matching the file specification                                                        
|-
                                    provided                                                                                     
|F|| || ||DosGetCollate||Get the current collating sequence based upon the current code-page
R   21H 4FH     DosFindNext     Find the next file in a group of                                                            
|-
                                    files matching the file specification                                                        
| ||21H||66H||DosGetCP||Return the code-page in use by the current application
                                    provided in the call to DosFindFirst                                                        
|-
                  DosFlagProcess   Set an external event flag that other                                                        
|R||21H||38H||DosGetCtryInfo||Return country dependent formatting information
                                    processes can access for synchroniza-                                                       
|-
                                    tion of concurrent processes                                                                
|F||21H||2AH,2CH||DosGetDateTime||Return the current date and time
                  DosFreeModule   Release the link to the dynamic link                                                        
|-
                                    module specified by the module handle.                                                      
| ||21H||65H||DosGetDBCSEnv||Return the DBCS vector for the specified country code
                                    This service decrements the usage                                                            
|-
                                    for the specified module                                                                    
|F|| || ||DosGetEnv||Return the segment and offset address of the current process command environment
F   21H 49H     DosFreeSeg       Release a previously allocated memory                                                        
|-
                                    segemnt                                                                                     
|F|| || ||DosGetHugeShift||Return the shift count used by DosAllocHuge to allocate memory larger than one segment
F                 DosGetCollate   Get the current collating sequence                                                          
|-
                                    based upon the current code-page                                                            
| || || ||DosGetInfoSeg||Return the address of the OS/2 system variables
    21H 66H     DosGetCP         Return the code-page in use by the                                                          
|-
                                    current application                                                                          
|F|| || ||DosGetMachineMode||Return the current processor mode (real or Protected)
R   21H 38H     DosGetCtryInfo   Return country dependent formatting                                                          
|-
                                    information                                                                                 
|F|| || ||DosGetMessage||Obtain the text from the system message file for the specified message and place it into a user-defined buffer
F   21H 2AH,2CH DosGetDateTime   Return the current date and time                                                            
|-
    21H 65H     DosGetDBCSEnv   Return the DBCS vector for the                                                              
| || || ||DosGetModHandle||Return a handle to a dynamic link module
                                    specified country code                                                                      
|-
F                 DosGetEnv       Return the segment and offset address                                                        
| || || ||DosGetModName||Get the complete DOS path name for the dynamic link module associated with the file handle provided
                                    of the current process command envir-                                                        
|-
                                    onment                                                                                       
| || || ||DosGetProcAddr||Return the far address to the procedure specified within a dynamic link library
F                 DosGetHugeShift Return the shift count used by                                                              
|-
                                    DosAllocHuge to allocate memory larger                                                      
| || || ||DosGetPrty||Return the priority of the current process
                                    than one segment                                                                            
|-
                  DosGetInfoSeg   Return the address of the OS/2 system                                                        
| || || ||DosGetResource||Return the segment selector for the handle to the specified resource
                                    variables                                                                                   
|-
F                 DosGetMachineMode Return the current processor mode                                                          
| || || ||DosGetSeg||Obtain access to the memory segment specified by the selector provided
                                    (real or Protected)                                                                          
|-
F                 DosGetMessage   Obtain the text from the system                                                              
| || || ||DosGetShrSeg||Obtain access to the shared memory segment specified by the name provided. The usage count of the segment is incremented
                                    message file for the specified message                                                      
|-
                                    and place it into a user-defined                                                            
|F||21H||30H||DosGetVersion||Return the DOS version number
                                    buffer                                                                                      
|-
                  DosGetModHandle Return a handle to a dynamic link                                                            
| || || ||DosGiveSeg||Allow the process specified by the process identification provided to access a shared memory segment
                                    module                                                                                       
|-
                  DosGetModName   Get the complete DOS path name for the                                                      
|R|| || ||DosHoldSignal||Enable/disable signal processing for the current process
                                    dynamic link module associated with the                                                      
|-
                                    file handle provided                                                                        
|F|| || ||DosInsMessage||Place a text string into the body of a message
                  DosGetProcAddr   Return the far address to the procedure                                                      
|-
                                    specified within a dynamic link library                                                      
| || || ||DosKillProcess||Terminate a process and return a termination code to the parent process or OS/2
                  DosGetPrty       Return the priority of the current process                                                  
|-
                  DosGetResource   Return the segment selector for the handle                                                  
| || || ||DosLoadModule||Load the dynamic link module specified and return a handle.
                                    to the specified resource                                                                    
|-
                  DosGetSeg       Obtain acces to the memory segment specified                                                
| || || ||DosLockSeg||Lock a segment of memory marked as discardable
                                    by the selector provided                                                                    
|-
                  DosGetShrSeg     Obtain access to the shared memory segment                                                  
| || || ||DosMakePipe||Create a communications pipe for the calling process
                                    specified by the name provided. The usage                                                    
|-
                                    count of the segment is incremented                                                          
| || || ||DosMemAvail||Return the size of the largest block of memory available
F   21H 30H     DosGetVersion   Return the DOS version number                                                                
|-
                  DosGiveSeg       Allow the process specified by the process                                                  
|F||21H||39H||DosMkDir||Create the specified directory
                                    identification provided to access a shared                                                  
|-
                                    memory segment                                                                              
| || || ||DosMonClose||Close the handle to a serial device that the process has been monitoring
R                 DosHoldSignal   Enable/disable signal processing for the                                                    
|-
                                    current process                                                                              
| || || ||DosMonOpen||Open a handle to a serial device for device I/O monitoring
F                 DosInsMessage   Place a text string into the body of a                                                      
|-
                                    message                                                                                     
| || || ||DosMonRead||Wait for and return the input records to a serial device open for I/O monitoring
                  DosKillProcess   Terminate a process and return a termination                                                
|-
                                    code to the parent process or OS/2                                                          
| || || ||DosMonReg||Create input and output buffer structures for device I/O monitoring
                  DosLoadModule   Load the dynamic link module specified and                                                  
|-
                                    return a handle.                                                                            
| || || ||DosMonWrite||Write a data record to the output monitor buffer of a device open for I/O monitoring
                  DosLockSeg       Lock a segment of memory marked as discard-                                                  
|-
                                    able                                                                                         
|F||21H||56H||DosMove||Move a file from one location to another
                  DosMakePipe     Create a communications pipe for the calling                                                
|-
                                    process                                                                                     
| || || ||DosMuxSemWait||Suspense the execution of the current thread until one or more semaphores have been cleared
                  DosMemAvail     Return the size of the largest block of                                                      
|-
                                    memory available                                                                            
|F|| || ||DosNewSize||Change the size of the file associated with the specified file handle
F   21H 39H     DosMkDir         Create the specified directory                                                              
|-
                  DosMonClose     Close the handle to a serial device that the                                                
|R||21H||3CH,3DH||DosOpen||Open an existing file (if present) or create a file with the name specified by the ASCIIZ string provided
                                    process has been monitoring                                                                  
|-
                  DosMonOpen       Open a handle to a serial device for device                                                  
| || || ||DosOpenQueue||Open the queue specified by the ASCIIZ string provided for use by the current process
                                    I/O monitoring                                                                              
|-
                  DosMonRead       Wait for and return the input records to a                                                  
| || || ||DosOpenSem||Open the semaphore specified by the ASCIIZ string provided for use by the current process
                                    serial device open for I/O monitoring                                                        
|-
                  DosMonReg       Create input and output buffer structures                                                    
| || || ||DosPeekQueue||Examine, but do not remove, an element from the specified queue
                                    for device I/O monitoring                                                                    
|-
                  DosMonWrite     Write a data record to the output monitor                                                    
| || || ||DosPFSActivate||Activate the code-page and font specified for the printer. This activation only affects the calling process.
                                    buffer of a device open for I/O monitoring                                                  
|-
F   21H 56H     DosMove         Move a file from one location to another                                                    
| || || ||DosPFSCloseUser||Notify the font-switching software that the process has closed its spool file. The font-switching software can release any related resources
                  DosMuxSemWait   Suspens the execution of the current thread                                                  
|-
                                    until one or more semaphores have been                                                      
| || || ||DosPFSInit||Direct the font-switching software to initialize code-page switching and font-switching for the specified printer
                                    cleared                                                                                     
|-
F                 DosNewSize       Change the size of the file associated with                                                  
| || || ||DosPFSQueryAct||Return the current code-page and font for the specified printer
                                    the specified file handle                                                                    
|-
R   21H 3CH,3DH DosOpen         Open an existing file (if present) or create                                                
| || || ||DosPFSVerifyFont||Ensure that the code-page and font desired are supported by the specified printer
                                    a file with the name specified by the ASCIIZ                                                
|-
                                    string provided                                                                              
| || || ||DosPhysicalDisk||Return partitioned disk information
                  DosOpenQueue     Open the queue specified by the ASCIIZ string                                                
|-
                                    provided for use by the current process                                                      
|F|| || ||DosPortAccess||Request or release access to a hardware port or ports
                  DosOpenSem       Open the semaphore specified by the ASCIIZ                                                  
|-
                                    string provided for use by the current                                                      
| || || ||DosPtrace||Set a Ptrace buffer that is used in debugging
                                    process                                                                                     
|-
                  DosPeekQueue     Examine, but do not remove, an element from                                                  
| || || ||DosPurgeQueue||Delete all of the elements contained in the queue associated with the handle provided
                                    the specified queue                                                                          
|-
                  DosPFSActivate   Activate the code-page and font specified for                                                
| || || ||DosPutMessage||Output the message provided to the file or device associated with a given file handle
                                    the printer. This activation only affects the                                                
|-
                                    calling process.                                                                            
|F||21H||47H||DosQCurDir||Return the current directory
                  DosPFSCloseUser Notify the font-switching software that the                                                  
|-
                                    process has closed its spool file. The font-                                                
|F||21H||19H||DosQCurDisk||Return the current disk drive
                                    switching software can release any related                                                  
|-
                                    resources                                                                                   
|R|| || ||DosQFHandState||Query the state of the file associated with the handle provided
                  DosPFSInit       Direct the font-switching software to init-                                                 
|-
                                    ialize code-page switching and font-switching                                                
|F||21H||57H||DosQFileInfo||Return date and time specifics about the file associated with the file handle provided
                                    for the specified printer                                                                    
|-
                  DosPFSQueryAct   Return the current code-page and font for the                                                
|F||21H||43H||DosQFileMode||Return the attribute byte for a specific file
                                    specified printer                                                                            
|-
                  DosPFSVerifyFont Ensure that the code-page and font desired                                                  
|F||21H||36H||DosQFSInfo||Return information about the disk in the specified drive
                                    are supported by the specified printer                                                      
|-
                  DosPhysicalDisk Return partitioned disk information                                                          
| || || ||DosQHandType||Determine if the handle specified references a device or file
F                 DosPortAccess   Request or release access to a hardware port                                                
|-
                                    or ports                                                                                    
| || || ||DosQueryQueue||Return the number of elements in the specified queue
                  DosPtrace       Set a Ptrace buffer that is used in debugging                                                
|-
                  DosPurgeQueue   Delete all of the elements contained in the                                                  
|F||21H||54H||DosQVerify||Determine whether the specified queue is active or inactive
                                    queue associated with the handle provided                                                    
|-
                  DosPutMessage   Output the message provided to the file or                                                  
|F||21H||3FH||DosRead||Read the specified number of bytes from the file associated with the file handle
                                    device associated with a given file handle                                                  
|-
F   21H 47H     DosQCurDir       Return the current directory                                                                
| || || ||DosReadAsynch||Read the specified number of bytes from the file associated with the file handle. The I/O operation occurs concurrently with the continued execution of the process
F   21H 19H     DosQCurDisk     Return the current disk drive                                                                
|-
R                 DosQFHandState   Query the state of the file associated with                                                  
| || || || DosReadQueue||Read and remove an element from the specified queue
                                    tha handle provided                                                                          
|-
F   21H 57H     DosQFileInfo     Return dat and time specifics about the file                                                
|R|| || ||DosReallocHuge||Modify the size of a previously allocated huge (larger than 1 segment) section of memory
                                    associated with the file handle provided                                                    
|-
F   21H 43H     DosQFileMode     Return the attribute byte for a specific file                                                
|R||21H||4AH||DosReallocSeg||Modify the size of a previously allocated memory segment
F   21H 36H     DosQFSInfo       Return information about the disk in the                                                    
|-
                                    specified drive                                                                              
| || || ||DosResumeThread||Restart a previously suspended thread of execution for the current process
                  DosQHandType     Determine if the handle specified references                                                
|-
                                    a device or file                                                                            
|F||3AH|| ||DosRmDir||Remove the directory specified by the ASCIIZ string
                  DosQueryQueue   Return the number of elements in the specif-                                                
|-
                                    ied queue                                                                                   
|F|| || ||DosScanEnv||Search a process environment segment for a specified variable and return its value if found
F   21H 54H     DosQVerify       Determine whether the specified queue is                                                    
|-
                                    active or inactive                                                                          
| || || ||DosSearchPath||Define a search path for data files
F   21H 3FH     DosRead         Read the specified number of bytes from the                                                  
|-
                                    file associated with the file handle                                                        
|F||21H||0EH||DosSelectDisk||Set the desired current drive
                  DosReadAsynch   Read the specified number of bytes from the                                                  
|-
                                    file associated with the file handle. The I/O                                                
| || || ||DosSelectSession||Select the desired foreground session
                                    operation occurs concurrently with the                                                      
|-
                                    continued execution of the process                                                          
| || || ||DosSemClear||Clear the specified semaphore
                  DosReadQueue     Read and remove an element from the specified                                                
|-
                                    queue                                                                                       
| || || ||DosSemRequest||Obtain a new handle to a new semaphore
R                 DosReallocHuge   Modify the size of a previously allocated                                                    
|-
                                    huge (larger than 1 segment) section of                                                      
| || || ||DosSemSet||Set the semaphore associated with the handle provided
                                    memory                                                                                       
|-
R   21H 4AH     DosReallocSeg   Modify the size of a previosly allocated                                                    
| || || ||DosSemSetWait||Set the semaphore associated with the handle provided and suspend execution of the current thread until the semaphore is cleared
                                    memory segment                                                                              
|-
                  DosResumeThread Restart a previously suspended thread of                                                    
| || || ||DosSemWait||Suspend execution of the current thread until the semaphore associated with the handle provided is cleared
                                    execution for the current process                                                            
|-
F   3AH           DosRmDir         Remove the directory specified by the ASCIIZ                                                
| || || ||DosSendCtlC||Send a Ctrl-C signal to the lowest process in the tree of processes
                                    string                                                                                       
|-
F                 DosScanEnv       Search a process environment segment for a                                                  
| ||21H||66H||DosSetCP||Set the code-page as specified for the calling process
                                    specified variable and return its value if                                                  
|-
                                    found                                                                                       
|F||21H||2BH,2DH||DosSetDateTime||Set the current system date and time
                  DosSearchPath   Define a search path for data files                                                          
|-
F   21H 0EH     DosSelectDisk   Set the desired current drive                                                                
|R|| || ||DosSetFHandState||Set the state of the file associated with the handle provided
                  DosSelectSession Select the desired foreground session                                                        
|-
                  DosSemClear     Clear the specified semaphore                                                                
|F||21H||57H||DosSetFileInfo||Set the date information (last read, last write, creation, and so on) for the file associated with the handle provided
                  DosSemRequest   Obtain a new handle to a new semaphore                                                      
|-
                  DosSemSet       Set the semaphore associated with the handle                                                
|F||21H||43H||DosSetFileMode||Set the attribute byte for the file associated with the file handle provided
                                    provided                                                                                     
|-
                  DosSemSetWait   Set the semaphore associated with the handle                                                
|F|| || ||DosSetFsInfo||Sets information for a file system specified device
                                    provided and suspend execution of the current                                                
|-
                                    thread until the semaphore is cleared                                                        
| ||21H||67H||DosSetMaxFH||Define the maximum number of file handles (up to 255) for the current process
                  DosSemWait       Suspend execution of the current thread until                                                
|-
                                    the semaphore associated with the handle                                                    
| || || ||DosSetPrty||Set the priority for the current thread
                                    provided is cleared                                                                          
|-
                  DosSendCtlC     Send a Ctrl-C signal to the lowest process in                                                
| || || ||DosSetSession||Set the status of a child process
                                    the tree of processes                                                                        
|-
    21H 66H     DosSetCP         Set the code-page as specified for the call-                                                
|R|| || ||DosSetSigHandler||Define a signal-handling routine for a specific signal
                                    ing process                                                                                 
|-
F   21H 2BH,2DH DosSetDateTime   Set the current system date and time                                                        
|F||21H||25H||DosSetVec||Define an exception-handling routine for specified exceptions
R                 DosSetFHandState Set the state of the file associated with the                                                
|-
                                    handle provided                                                                              
|F||21H||2EH||DosSetVerify||Enable or disable disk verification for the current process
F   21H 57H     DosSetFileInfo   Set the date information (last read, last                                                    
|-
                                    write, creation, and so on) for the file                                                    
| || || ||DosSleep||Suspend the current thread for a specified interval of time
                                    associated with the handle provided                                                          
|-
F   21H 43H     DosSetFileMode   Set the attribute byte for the file assoc-                                                   
| || || ||DosStartSession||Invoke a second application as an OS/2 session
                                    iated with the file handle provided                                                          
|-
F                 DosSetFsInfo     Sets information for a file system specified                                                
| || || ||DosStopSession||Terminate a session previously invoked thru the DosStartSession
                                    device                                                                                       
|-
    21H 67H     DosSetMaxFH     Define the maximum number of file handles (up                                                
|F|| || ||DosSubAlloc||Allocate memory from within a segment previously allocated by DosAllocSeg or DosAllocShrSeg
                                    to 255) for the current process                                                              
|-
                  DosSetPrty       Set the priority for the current thread                                                      
|F|| || ||DosSubFree||Free memory previously allocated by DosSubAlloc
                  DosSetSession   Set the status of a child process                                                            
|-
R                 DosSetSigHandler Define a signal-handling routine for a                                                      
|F|| || ||DosSubSet||Initialize a segment for suballocation, or change the size of a previously suballocated segment
                                    specific signal                                                                              
|-
F   21H 25H     DosSetVec       Define an exception-handling routine for                                                    
| || || ||DosSuspendThread||Suspend the current thread of execution until a DosResumeThread service is invoked
                                    specified exeptions                                                                         
|-
F   21H 2EH     DosSetVerify     Enable or disable disk verification for the                                                  
| || || ||DosSystemService||Request OS/2 to perform a unique function (such as system-wide event notification for the specific process)
                                    current process                                                                              
|-
                  DosSleep         Suspend the current thread for a specified                                                  
| || || ||DosTimerAsynch||Start a timer that runs asynchronously to the thread issuing the request. Upon completion of the time interval, this service sets the specified semaphore
                                    interval of time                                                                            
|-
                  DosStartSession Invoke a second application as an OS/2                                                      
| || || ||DosTimerStart||Start a periodic interval timer that runs asynchronously to the current thread. Each time the interval completes, the service clears the specified semaphore
                                    session                                                                                     
|-
                  DosStopSession   Terminate a session previously invoked thru                                                  
| || || ||DosTimerStop||Stop a periodic interval timer previously started by DosTimerStart or DosTimerAsynch
                                    the DosStartSession                                                                          
|-
F                 DosSubAlloc     Allocate memory from within a segment                                                        
| || || ||DosUnlockSeg||Unlock a memory segment previously marked as discardable
                                    previously allocated by DosAllocSeg or                                                      
|-
                                    DosAllocShrSeg                                                                               
| || || ||DosWait||Suspend the current process until the child process specified by the provided process identification terminates
F                 DosSubFree       Free memory previously allocated by                                                          
|-
                                    DosSubAlloc                                                                                 
|F||21H||40H||DosWrite||Write the specified number of bytes to the file associated with the file handle provided
F                 DosSubSet       Initialize a segment for suballocation, or                                                  
|-
                                    change the size of a previously suballocated                                                
| || || ||DosWriteAsynch||Write the specified number of bytes to the file associated with the file handle that is provided concurrently with the threads remaining processing
                                    segment                                                                                     
|-
                  DosSuspendThread Suspend the current thread of execution until                                                
| || || ||DosWriteQueue||Place an element in a specified queue
                                    a DosResumeThread service is invoked                                                        
|}
                  DosSystemService Request OS/2 to perform a unique function                                                    
 
                                    (such as system-wide event notification for                                                  
{|class="wikitable"
                                    the specific process)                                                                        
!API||INT||SUBCODE||FUNCTION||DESCRIPTION
                  DosTimerAsynch   Start a timer that runs asynchronously to the                                                
|-
                                    thread issuing the request. Upon completion                                                  
|F||16H||00H||KbdCharIn||Return the character scan code from the standard input device
                                    of the time interval, this service sets the                                                  
|-
                                    specified semaphore                                                                          
| || || ||KbdClose||Close a handle associated with a logical (unique to a process) keyboard
                  DosTimerStart   Start a periodic interval timer that runs                                                    
|-
                                    asynchronously to the current thread. Each                                                  
| || || ||KbdCustCP||Install a user-definable custom keyboard translation table. The table only affects the keyboard handle provided
                                    time the interval completes, the service                                                    
|-
                                    clears the specified semaphore                                                              
| || || ||KbdDeRegister||Remove a previously registered keyboard from the current session
                  DosTimerStop     Stop a periodic interval timer previously                                                    
|-
                                    started by DosTimerStart or DosTimerAsynch                                                  
|F|| || ||KbdFlushBuffer||Clear the keyboard buffer for a specific keyboard handle
                  DosUnlockSeg     Unlock a memory segment previously marked as                                                
|-
                                    discardable                                                                                 
| || || ||KbdFreeFocus||Release the logical-to-physical keyboard mapping produced by KbdGetFocus
                  DosWait         Suspend the current process until the child                                                  
|-
                                    process specified by the provided process                                                    
| || || ||KbdGetFocus||Join a logical (process unique) keyboard to a physical keyboard
                                    identification terminates                                                                    
|-
F   21H 40H     DosWrite         Write the specified number of bytes to the                                                  
|F||16H||00H||KbdGetStatus||Return information about a specific logical keyboard
                                    file associated with the file handle                                                        
|-
                                    provided                                                                                     
| || || ||KbdGetXT||Obtain information from the current keyboard translation table
                  DosWriteAsynch   Write the specified number of bytes to the                                                  
|-
                                    file associated with the file handle that is                                                
| || || ||KbdOpen||Open a logical keyboard and return a keyboard handle
                                    provided concurrently with the threads                                                      
|-
                                    remaining processing                                                                        
|R||16H||00H||KbdPeek||Return, but do not remove, a keyboard scan code if present in the keyboard buffer associated with the keyboard handle provided
                  DosWriteQueue   Place an element in a specified queue                                                        
|-
F   16H 00H     KbdCharIn       Return the character scan code from the                                                      
| || || ||KbdRegister||Register a keyboard subsystem for a specific session
                                    standard input device                                                                        
|-
                  KbdClose         Close a handle associated with a logical                                                    
| || || ||KbdSetFgnd||Increase the priority of the foreground key board thread
                                    (unique to a process) keyboard                                                              
|-
                  KbdCustCP       Install a user-definable custom keyborad                                                     
| || || ||KbdSetStatus||Set the size characteristics for a logical keyboard
                                    translation table. The table only affects                                                    
|-
                                    the keyboard handle provided                                                                
| || || ||KbdSetXT||Set the keyboard translation table for a logical keyboard
                  KbdDeRegister   Remove a previously registered keyboard from                                                
|-
                                    the current session                                                                          
| || || ||KbdShellInit||Request the shell to identify itself to the keyboard routing software
F                 KbdFlushBuffer   Clear the keyboard buffer for a specific                                                    
|-
                                    keyboard handle                                                                              
|F||21H||0AH||KbdStringIn||Read a character string from a logical keybd
                  KbdFreeFocus     Release the logical-to-physical keyboard                                                    
|-
                                    mapping produced by KbdGetFocus                                                              
| || || ||KbdSynch||Synchronize access to the keyboard subsystem
                  KbdGetFocus     Join a logical (process unique) keyboard                                                    
|-
                                    to a physical keyboard                                                                      
| || || ||KbdXlate||Translate a scan code into a shift state and ASCII code
F   16H 00H     KbdGetStatus     Return information about a specific logical                                                  
|}
                                    keyboard                                                                                     
 
                  KbdGetXT         Obtain information from the current keyboard                                                
{|class="wikitable"
                                    translation table                                                                            
!API||INT||SUBCODE||FUNCTION||DESCRIPTION
                  KbdOpen         Open a logical keyboard and return a                                                        
|-
                                    keyboard handle                                                                              
| || || ||MouClose||Close the mouse device handle for the current screen group
R   16H 00H     KbdPeek         Return, but do not remove, a keyboard scan                                                  
|-
                                    code if present in the keyboard buffer                                                      
| || || ||MouDeRegister||Remove a partially registered mouse subsystem for the current session
                                    associated with the keyboard handle provided                                                
|-
                  KbdRegister     Register a keyboard subsystem for a specific                                                
| ||33H||01H||MouDrawPtr||Notify the mouse device driver that a screen area previously restricted from access is now available
                                    session                                                                                     
|-
                  KbdSetFgnd       Increase the priority of the foreground key                                                  
| || || ||MouFlushQueue||Direct the mouse device driver to purge the mouse event queue for the current session
                                    board thread                                                                                
|-
                  KbdSetStatus     Set the size characteristics for a logical                                                  
| || || ||MouGetDevStatus||Return the current mouse device driver settings
                                    keyboard                                                                                     
|-
                  KbdSetXT         Set the keyboard translation table for a                                                    
| || || ||MouGetEventMask||Return the event mask for the current mouse device driver
                                    logical keyboard                                                                            
|-
                  KbdShellInit     Request the shell to identify itself to the                                                  
| || || ||MouGetHotKey||Return the specific mouse key used for input (left, middle, or right)
                                    keyboard routing software                                                                    
|-
F   21H 0AH     KbdStringIn     Read a character string from a logical keybd                                                
| || || ||MouGetNumButtons||Return the number of buttons that the mouse driver supports
                  KbdSynch         Synchronize access to the keyboard subsystem                                                
|-
                  KbdXlate         Translate a scan code into a shift state and                                                
| || || ||MouGetNumMickeys||Return the number of "Mickeys" per centimeter for the current mouse driver
                                    ASCII code                                                                                  
|-
                  MouClose         Close the mouse device handle for the current                                                
| || || ||MouGetNumQueEl||Return the status of the event queue for the current mouse device driver
                                    screen group                                                                                
|-
                  MouDeRegister   Remove a partially registered mouse subsystem                                                
| ||33H||03H||MouGetPtrPos||Return the current row and column of the mouse pointer shape
                                    for the current session                                                                      
|-
    33H 01H     MouDrawPtr       Notify the mouse device driver that a screen                                                
| || || ||MouGetPtrShape||Obtain the current mouse pointer shape
                                    area previously restricted from access is now                                                
|-
                                    available                                                                                   
| || || ||MouGetScaleFact||Return the current scaling factors for the mouse pointer shape
                  MouFlushQueue   Direct the mouse device driver to purge the                                                  
|-
                                    mouse event queue for the current session                                                    
| || || ||MouInitReal||Initialize the mouse real-mode pointer
                  MouGetDevStatus Return the current mouse device driver                                                      
|-
                                    settings                                                                                     
| ||33H||00H||MouOpen||Open a mouse device driver for the current screen group. Return a device handle
                  MouGetEventMask Return the event mask for the current mouse                                                  
|-
                                    device driver                                                                                
| ||33H||05H,06H||MouReadEventQue||Read and remove an event from the current mouse driver event queue
                  MouGetHotKey     Return the specific mouse key used for input                                                
|-
                                    (left, middle, or right)                                                                    
| || || ||MouRegister||Register a mouse subsystem for use with the current screen group
                  MouGetNumButtons Return the number of buttons that the mouse                                                  
|-
                                    driver supports                                                                              
| ||33H||02H||MouRemovePtr||Restrict a screen area from use by the mouse pointer
                  MouGetNumMickeys Return the number of "Mickeys" per centimeter                                                
|-
                                    for the current mouse driver                                                                
| || || ||MouSetDevStatus||Set the current mouse device driver status flags
                  MouGetNumQueEl   Return the status of the event queue for the                                                
|-
                                    current mouse device driver                                                                  
| ||33H||0CH||MouSetEventMask||Assign an event mask to the current mouse device driver
    33H 03H     MouGetPtrPos     Return the current row and column of the                                                    
|-
                                    mouse pointer shape                                                                          
| || || ||MouSetHotKey||Define which button (left, middle, or right) serves as the hot key for the current mouse driver
                  MouGetPtrShape   Obtain the current mouse pointer shape                                                      
|-
                  MouGetScaleFact Return the current scaling factors for the                                                  
| ||33H||04H||MouSetPtrPos||Set the mouse pointer screen coordinates
                                    mouse pointer shape                                                                          
|-
                  MouInitReal     Initialize the mouse real-mode pointer                                                      
| ||33H||09H,0AH||MouSetPtrShape||Set the mouse pointer shape
    33H 00H     MouOpen         Open a mouse device driver for the current                                                  
|-
                                    screen group. Return a device handle                                                        
| || || ||MouSetScaleFact||Set the scaling factor for the mouse pointer shape
    33H 05H,06H MouReadEventQue Read and remove an event from the current                                                    
|-
                                    mouse driver event queue                                                                    
| || || ||MouShellInit||Mouse shell indentifies itself to the mouse router
                  MouRegister     Register a mouse subsystem for use with the                                                  
|-
                                    current screen group                                                                        
| || || ||MouSynch||Direct mouse subsystems to synchronize access to the mouse device driver
    33H 02H     MouRemovePtr     Restrict a screen area from use by the mouse                                                
|}
                                    pointer                                                                                     
 
                  MouSetDevStatus Set the current mouse device driver status                                                  
{|class="wikitable"
                                    flags                                                                                       
!API||INT||SUBCODE||FUNCTION||DESCRIPTION
    33H 0CH     MouSetEventMask Assign an event mask to the current mouse                                                    
|-
                                    device driver                                                                                
| || || ||VioDeRegister||Remove a previously registered video subsystem from a screen group
                  MouSetHotKey     Define which button (left, middle, or right)                                                
|-
                                    serves as the hot key for the current mouse                                                  
| || || ||VioEndPopUp||Remove a temporary window created by VioPopUp that is no longer required
                                    driver                                                                                       
|-
    33H 04H     MouSetPtrPos     Set the mouse pointer screen coordinates                                                    
| || || ||VioGetAnsi||Specify whether ANSI support is on or off for the current video buffer
    33H 09H,0AH MouSetPtrShape   Set the mouse pointer shape                                                                  
|-
                  MouSetScaleFact Set the scaling factor for the mouse pointer                                                
|F|| || ||VioGetBuf||Return the address of the logical (process unique) video buffer specified
                                    shape                                                                                        
|-
                  MouShellInit     Mouse shell indentifies itself to the mouse                                                  
| || || ||VioGetCP||Return the code-page used for display by the specified handle
                                    router                                                                                       
|-
                  MouSynch         Direct mouse subsystems to synchronize access                                                
| || || ||VioGetConfig||Return the current video display configuration
                                    to the mouse device driver                                                                  
|-
                  VioDeRegister   Remove a previously registered video subsystem                                              
|F||10H||03H||VioGetCurPos||Return the current row and column cursor position for the specified logical video buffer
                                    from a screen group                                                                          
|-
                  VioEndPopUp     Remove a temporary window created by VioPopUp                                                
|F|| || ||VioGetCurType||Return the cursor type and attributes for the specified logical video buffer
                                    that is no longer required                                                                  
|-
                  VioGetAnsi       Specify whether ANSI support is on or off for                                                
| || || ||VioGetFont||Return the current font for the specified logical video buffer
                                    the current video buffer                                                                    
|-
F                 VioGetBuf       Return the address of the logical (process                                                  
|F||10H||0FH||VioGetMode||Return the current video mode for the specified logical video buffer
                                    unique) video buffer specified                                                              
|-
                  VioGetCP         Return the code-page used for display by the                                                
|F|| || ||VioGetPhysBuf||Return the address of the physical video buffer
                                    specified handle                                                                            
|-
                  VioGetConfig     Return the current video display configuration                                              
| || || ||VioGetState||Return the current video states, or the palette registers, the border color, or background intensity
F   10H 03H     VioGetCurPos     Return the current row and column cursor                                                    
|-
                                    position for the specified logical video buffer                                              
| || || ||VioModeUndo||Allow one process thread to cancel a VioModeWait service issued by another thread in the same process
F                 VioGetCurType   Return the cursor type and attributes for the                                                
|-
                                    specified logical video buffer                                                              
| || || ||VioModeWait||Request that a graphics mode application be notified each time it needs to restore its video mode
                  VioGetFont       Return the current font for the specified                                                    
|-
                                    logical video buffer                                                                        
| || || ||VioPopUp||Allocate a temporary popup display screen for message display
F   10H 0FH     VioGetMode       Return the current video mode for the specified                                              
|-
                                    logical video buffer                                                                        
| || || ||VioPrtSc||Print the current screen contents
F                 VioGetPhysBuf   Return the address of the physical video buffer                                              
|-
                  VioGetState     Return the current video states, or the palette                                              
| || || ||VioPrtScToggle||The OS/2 session manager invokes this routine each time the user presses the Shift-PrtSc key combination
                                    registers, the border color, or background                                                  
|-
                                    intensity                                                                                   
|F||10H||08H||VioReadCellStr||Read a string of characters and attributes from the screen starting at a specified row and column location
                  VioModeUndo     Allow one process thread to cancel a                                                        
|-
                                    VioModeWait service issued by another thread                                                
|F|| || ||VioReadCharStr||Read a character string from the display starting at ther specified row and column
                                    in the same process                                                                          
|-
                  VioModeWait     Request that a graphics mode application be                                                  
| || || ||VioRegister||Register a video subsystem with a specific screen group
                                    notified each time it needs to restore its                                                  
|-
                                    video mode                                                                                  
| || || ||VioSavRedraw||Request that a process be notified when it must save or redraw its contents
                  VioPopUp         Allocvate a temporary popup display screen for                                              
|-
                                    message display                                                                              
| || || ||VioSavRedrawUndo||Allow one thread in a process to cancel a
                  VioPrtSc         Print the current screen contents                                                            
|-
                  VioPrtScToggle   The OS/2 session manager invokes this routine                                                
| || || ||VioSavRedrawWait||service issued by another thread within the same process
                                    each time the user presses the Shift-PrtSc key                                              
|-
                                    combination                                                                                 
|F||10H||07H||VioScrollDn||Scroll the screen contents down as specified by the row and column numbers and number of lines to scroll
F   10H 08H     VioReadCellStr   Read a string of characters and attributes from                                              
|-
                                    the screen starting at a specified row and                                                  
| || || ||VioScrLock||Lock the screen and prevent I/O operations
                                    column location                                                                              
|-
F                 VioReadCharStr   Read a character string from the display start-                                             
|F|| || ||VioScrollLf||Scroll the screen contents to the left as specified
                                    ing at ther specified row and column                                                        
|-
                  VioRegister     Register a video subsystem with a specific                                                  
|F|| || ||VioScrollRt||Scroll the screen contents to the right as specified
                                    screen group                                                                                
|-
                  VioSavRedraw     Request that a process be notified when it must                                              
|F||10H||06H||VioScrollUp||Scroll the screen contents up as specified by the row and column numbers and number of lines to scroll
                                    save or redraw its contents                                                                  
|-
                  VioSavRedrawUndo Allow one thread in a process to cancel a                                                    
| || || ||VioScrUnlock||Unlock the screen for I/O operations
                                    VioSavRedrawWait service issued by another                                                  
|-
                                    thread within the same process                                                              
| || || ||VioSetAnsi||Enable or disable ANSI support for the specified logical video buffer
F   10H 07H     VioScrollDn     Scrool the screen contents down as specified by                                              
|-
                                    the row and column numbers and number of lines                                              
| || || ||VioSetCP||Set the code-page for the specified logical video buffer
                                    to scroll                                                                                    
|-
                  VioScrLock       Lock the screen and prevent I/O operations                                                  
| || || ||VioSetCurPos||Set the cursor position to the row and column of the logical video buffer provided
F                 VioScrollLf     Scroll the screen contents to the left as                                                    
|-
                                    specified                                                                                   
|F||10H||02H||VioSetCurType||Set the cursor type (attributes) for the logical video display provided
F                 VioScrollRt     Scroll the screen contents to the right as                                                  
|-
                                    specified                                                                                   
| || || ||VioSetFont||Set the font for the logical video display
F   10H 06H     VioScrollUp     Scroll the screen contents up as specified by                                                
|-
                                    the row and column numbers and number of lines                                              
|F||10H||00H||VioSetMode||Set the display mode for the logical video display provided
                                    to scroll                                                                                    
|-
                  VioScrUnlock     Unlock the screen for I/O operations                                                        
| ||10H||0BH||VioSetState||Set the state for the palette registers, border color, or background intensity for the specified logical video display
                  VioSetAnsi       Enable or disable ANSI support for the                                                      
|-
                                    specified logical video buffer                                                              
|F|| || ||VioShowBuf||Update the physical display with the contents of a logical display buffer
                  VioSetCP         Set the code-page for the specified logical                                                  
|-
                                    video buffer                                                                                
|F||10H||09H||VioWrtCellStr||Write a character string (with attributes) to the specified video display location
                  VioSetCurPos     Set the cursor position to the row and column                                                
|-
                                    of the logical video buffer provided                                                        
|F||10H||0AH||VioWrtCharStr||Write a character string to the specified vidoe display location
F   10H 02H     VioSetCurType   Set the cursor type (attributes) for the                                                    
|-
                                    logical video display provided                                                              
|F|| || ||VioWrtCharStrAtt||Write a character string using a repeated attribute to the specified video display
                  VioSetFont       Set the font for the logical video display                                                  
|-
F   10H 00H     VioSetMode       Set the display mode for the logical video                                                  
|F|| || ||VioWrtNAttr||Write the character attribute to the video display at the specified location. This service provides an optional repeat count
                                    display provided                                                                            
|-
    10H 0BH     VioSetState     Set the state for the palette registers, border                                              
|F|| || ||VioWrtNCell||Write a character or attribute to the video display the specified number of times
                                    color, or background intensity for the                                                      
|-
                                    specified logical video display                                                              
|F|| || ||VioWrtNChar||Write a character to the video display starting at the specified location and repeating the display n times
F                 VioShowBuf       Update the physical display with the contents                                                
|-
                                    of a logical display buffer                                                                  
|F||10H||0EH||VioWrtTty||Write a character string to the video display starting at the current cursor position in TTY mode
F   10H 09H     VioWrtCellStr   Write a character string (with attributes) to                                                
|}
                                    the specified video display location                                                        
 
F   10H 0AH     VioWrtCharStr   Write a character string to the specified                                                    
[[Category:Technical]]
                                    vidoe display location                                                                      
F                 VioWrtCharStrAtt Write a character string using a repeated                                                    
                                    attribute to the specified video display                                                    
F                 VioWrtNAttr     Write the character attribute to the video                                                  
                                    display at the specified location. This service                                              
                                    provides an optional repeat count                                                            
F                 VioWrtNCell     Write a character or attribute to the video                                                  
                                    display the specified number of times                                                        
F                 VioWrtNChar     Write a character to the video display starting                                              
                                    at the specified location and repeating the                                                  
                                    display n times                                                                              
F   10  0EH     VioWrtTty       Write a character string to the video display                                                
                                    starting at the current cursor position in TTY                                              
                                    mode

Latest revision as of 22:54, 7 December 2022

By Bill Earle

The following information describes the OS/2 Application Program Interface (API) calls. I have included information under the API column as follows:

F
is a Family API (FAPI) call. This means that this call will also run under DOS 3.3, if assembled with the BIND program.
R
means Restricted function. Refer to the OS/2 Technical Reference Manual for further info.

I also have attempted to provide information to assist in porting old programs over to OS/2. INT and SUBCODE columns provide the old DOS interrupt and subcode functions. In some cases, these are approximations of old DOS calls. Again, refer to the OS/2 Technical Reference Manual for further information.

API INT SUBCODE FUNCTION DESCRIPTION
F BadDynLink Called on bad dynamic link
R DosAllocHuge Allocate memory greater than one segment
R 21H 48H DosAllocSegment Allocate a segment of memory
DosAllocShrSeg Allocate a shared-memory segment. The segment returned has a name that each process can access.
F DosBeep Generate a sound frequency for the specified duration
21H 0DH,68H DosBufReset Flush the disk buffers for the requesting process
F DosCaseMap Map a binary string into an ASCII string by using a DOS code-page
F 21H 3BH DosChdir Set the current directory
F 21H 42H DosChgFilePtr Move a file's read/write pointer
F DosCLIAccess Request CLI/STI privilege before performing IN/OUT operations.
F 21H 3EH DosClose Close the file associated with the specified file handle
DosCloseQueue Close the queue specified for use by the calling process
DosCloseSem Close the semaphore specified for use by the calling process
F DosCreateCSAlias Create an executable alias descriptor (second name) for the data type descriptor received
DosCreateQueue Create and open the queue specified for use by the calling process
DosCreatSem Create a semaphore for use by the calling process
DosCreateThread Create an asynchronous execution thread for the calling process. Threads are the OS/2 CPU scheduling entities.
R 21H 4DH DosCWait Wait for a child process termination and get return code
F 21H 41H DosDelete Delete the file specified by the ASCIIZ name.
F DosDevConfig Return device information about attached devices
F 21H 44H DosDevIOCtl Communicate with an opened device handle
F 21H 45H,46H DosDupHandle Return a duplicate DOS handle for the file handle provided
DosEnterCritSec Mark the entrance of a critical section of code and prevent the execution of other threads of code in the same process for concurrent processing synchronization
R DosError Allow the calling process to receive OS/2 hard-error notification as Opposed to the OS/2 generation of a hard-error signal
R 21H 59H DosErrorClass Get extended error information.
R 21H 4BH DosExecPgm Spawn a secondary program as a child process
R 21H 00H,4CH DosExit Complete the current thread of information
DosExitCritSec Mark the end of a critical section of code and enable other threads within the current process to execute again in a concurrent fashion
DosExitList Maintain the list (add,delete,modify) of routines that the current process is to execute upon completion
R 21H 5CH DosFileLock Lock or unlock a range of bytes within a file in support of file-sharing operations
R DosFindClose Close the handle associated with the file returned by a DosFindNext API service
R 21H 4EH DosFindFirst Find the first file in a group of files matching the file specification provided
R 21H 4FH DosFindNext Find the next file in a group of files matching the file specification provided in the call to DosFindFirst
DosFlagProcess Set an external event flag that other processes can access for synchronization of concurrent processes
DosFreeModule Release the link to the dynamic link module specified by the module handle.

This service decrements the usage for the specified module

F 21H 49H DosFreeSeg Release a previously allocated memory segment
F DosGetCollate Get the current collating sequence based upon the current code-page
21H 66H DosGetCP Return the code-page in use by the current application
R 21H 38H DosGetCtryInfo Return country dependent formatting information
F 21H 2AH,2CH DosGetDateTime Return the current date and time
21H 65H DosGetDBCSEnv Return the DBCS vector for the specified country code
F DosGetEnv Return the segment and offset address of the current process command environment
F DosGetHugeShift Return the shift count used by DosAllocHuge to allocate memory larger than one segment
DosGetInfoSeg Return the address of the OS/2 system variables
F DosGetMachineMode Return the current processor mode (real or Protected)
F DosGetMessage Obtain the text from the system message file for the specified message and place it into a user-defined buffer
DosGetModHandle Return a handle to a dynamic link module
DosGetModName Get the complete DOS path name for the dynamic link module associated with the file handle provided
DosGetProcAddr Return the far address to the procedure specified within a dynamic link library
DosGetPrty Return the priority of the current process
DosGetResource Return the segment selector for the handle to the specified resource
DosGetSeg Obtain access to the memory segment specified by the selector provided
DosGetShrSeg Obtain access to the shared memory segment specified by the name provided. The usage count of the segment is incremented
F 21H 30H DosGetVersion Return the DOS version number
DosGiveSeg Allow the process specified by the process identification provided to access a shared memory segment
R DosHoldSignal Enable/disable signal processing for the current process
F DosInsMessage Place a text string into the body of a message
DosKillProcess Terminate a process and return a termination code to the parent process or OS/2
DosLoadModule Load the dynamic link module specified and return a handle.
DosLockSeg Lock a segment of memory marked as discardable
DosMakePipe Create a communications pipe for the calling process
DosMemAvail Return the size of the largest block of memory available
F 21H 39H DosMkDir Create the specified directory
DosMonClose Close the handle to a serial device that the process has been monitoring
DosMonOpen Open a handle to a serial device for device I/O monitoring
DosMonRead Wait for and return the input records to a serial device open for I/O monitoring
DosMonReg Create input and output buffer structures for device I/O monitoring
DosMonWrite Write a data record to the output monitor buffer of a device open for I/O monitoring
F 21H 56H DosMove Move a file from one location to another
DosMuxSemWait Suspense the execution of the current thread until one or more semaphores have been cleared
F DosNewSize Change the size of the file associated with the specified file handle
R 21H 3CH,3DH DosOpen Open an existing file (if present) or create a file with the name specified by the ASCIIZ string provided
DosOpenQueue Open the queue specified by the ASCIIZ string provided for use by the current process
DosOpenSem Open the semaphore specified by the ASCIIZ string provided for use by the current process
DosPeekQueue Examine, but do not remove, an element from the specified queue
DosPFSActivate Activate the code-page and font specified for the printer. This activation only affects the calling process.
DosPFSCloseUser Notify the font-switching software that the process has closed its spool file. The font-switching software can release any related resources
DosPFSInit Direct the font-switching software to initialize code-page switching and font-switching for the specified printer
DosPFSQueryAct Return the current code-page and font for the specified printer
DosPFSVerifyFont Ensure that the code-page and font desired are supported by the specified printer
DosPhysicalDisk Return partitioned disk information
F DosPortAccess Request or release access to a hardware port or ports
DosPtrace Set a Ptrace buffer that is used in debugging
DosPurgeQueue Delete all of the elements contained in the queue associated with the handle provided
DosPutMessage Output the message provided to the file or device associated with a given file handle
F 21H 47H DosQCurDir Return the current directory
F 21H 19H DosQCurDisk Return the current disk drive
R DosQFHandState Query the state of the file associated with the handle provided
F 21H 57H DosQFileInfo Return date and time specifics about the file associated with the file handle provided
F 21H 43H DosQFileMode Return the attribute byte for a specific file
F 21H 36H DosQFSInfo Return information about the disk in the specified drive
DosQHandType Determine if the handle specified references a device or file
DosQueryQueue Return the number of elements in the specified queue
F 21H 54H DosQVerify Determine whether the specified queue is active or inactive
F 21H 3FH DosRead Read the specified number of bytes from the file associated with the file handle
DosReadAsynch Read the specified number of bytes from the file associated with the file handle. The I/O operation occurs concurrently with the continued execution of the process
DosReadQueue Read and remove an element from the specified queue
R DosReallocHuge Modify the size of a previously allocated huge (larger than 1 segment) section of memory
R 21H 4AH DosReallocSeg Modify the size of a previously allocated memory segment
DosResumeThread Restart a previously suspended thread of execution for the current process
F 3AH DosRmDir Remove the directory specified by the ASCIIZ string
F DosScanEnv Search a process environment segment for a specified variable and return its value if found
DosSearchPath Define a search path for data files
F 21H 0EH DosSelectDisk Set the desired current drive
DosSelectSession Select the desired foreground session
DosSemClear Clear the specified semaphore
DosSemRequest Obtain a new handle to a new semaphore
DosSemSet Set the semaphore associated with the handle provided
DosSemSetWait Set the semaphore associated with the handle provided and suspend execution of the current thread until the semaphore is cleared
DosSemWait Suspend execution of the current thread until the semaphore associated with the handle provided is cleared
DosSendCtlC Send a Ctrl-C signal to the lowest process in the tree of processes
21H 66H DosSetCP Set the code-page as specified for the calling process
F 21H 2BH,2DH DosSetDateTime Set the current system date and time
R DosSetFHandState Set the state of the file associated with the handle provided
F 21H 57H DosSetFileInfo Set the date information (last read, last write, creation, and so on) for the file associated with the handle provided
F 21H 43H DosSetFileMode Set the attribute byte for the file associated with the file handle provided
F DosSetFsInfo Sets information for a file system specified device
21H 67H DosSetMaxFH Define the maximum number of file handles (up to 255) for the current process
DosSetPrty Set the priority for the current thread
DosSetSession Set the status of a child process
R DosSetSigHandler Define a signal-handling routine for a specific signal
F 21H 25H DosSetVec Define an exception-handling routine for specified exceptions
F 21H 2EH DosSetVerify Enable or disable disk verification for the current process
DosSleep Suspend the current thread for a specified interval of time
DosStartSession Invoke a second application as an OS/2 session
DosStopSession Terminate a session previously invoked thru the DosStartSession
F DosSubAlloc Allocate memory from within a segment previously allocated by DosAllocSeg or DosAllocShrSeg
F DosSubFree Free memory previously allocated by DosSubAlloc
F DosSubSet Initialize a segment for suballocation, or change the size of a previously suballocated segment
DosSuspendThread Suspend the current thread of execution until a DosResumeThread service is invoked
DosSystemService Request OS/2 to perform a unique function (such as system-wide event notification for the specific process)
DosTimerAsynch Start a timer that runs asynchronously to the thread issuing the request. Upon completion of the time interval, this service sets the specified semaphore
DosTimerStart Start a periodic interval timer that runs asynchronously to the current thread. Each time the interval completes, the service clears the specified semaphore
DosTimerStop Stop a periodic interval timer previously started by DosTimerStart or DosTimerAsynch
DosUnlockSeg Unlock a memory segment previously marked as discardable
DosWait Suspend the current process until the child process specified by the provided process identification terminates
F 21H 40H DosWrite Write the specified number of bytes to the file associated with the file handle provided
DosWriteAsynch Write the specified number of bytes to the file associated with the file handle that is provided concurrently with the threads remaining processing
DosWriteQueue Place an element in a specified queue
API INT SUBCODE FUNCTION DESCRIPTION
F 16H 00H KbdCharIn Return the character scan code from the standard input device
KbdClose Close a handle associated with a logical (unique to a process) keyboard
KbdCustCP Install a user-definable custom keyboard translation table. The table only affects the keyboard handle provided
KbdDeRegister Remove a previously registered keyboard from the current session
F KbdFlushBuffer Clear the keyboard buffer for a specific keyboard handle
KbdFreeFocus Release the logical-to-physical keyboard mapping produced by KbdGetFocus
KbdGetFocus Join a logical (process unique) keyboard to a physical keyboard
F 16H 00H KbdGetStatus Return information about a specific logical keyboard
KbdGetXT Obtain information from the current keyboard translation table
KbdOpen Open a logical keyboard and return a keyboard handle
R 16H 00H KbdPeek Return, but do not remove, a keyboard scan code if present in the keyboard buffer associated with the keyboard handle provided
KbdRegister Register a keyboard subsystem for a specific session
KbdSetFgnd Increase the priority of the foreground key board thread
KbdSetStatus Set the size characteristics for a logical keyboard
KbdSetXT Set the keyboard translation table for a logical keyboard
KbdShellInit Request the shell to identify itself to the keyboard routing software
F 21H 0AH KbdStringIn Read a character string from a logical keybd
KbdSynch Synchronize access to the keyboard subsystem
KbdXlate Translate a scan code into a shift state and ASCII code
API INT SUBCODE FUNCTION DESCRIPTION
MouClose Close the mouse device handle for the current screen group
MouDeRegister Remove a partially registered mouse subsystem for the current session
33H 01H MouDrawPtr Notify the mouse device driver that a screen area previously restricted from access is now available
MouFlushQueue Direct the mouse device driver to purge the mouse event queue for the current session
MouGetDevStatus Return the current mouse device driver settings
MouGetEventMask Return the event mask for the current mouse device driver
MouGetHotKey Return the specific mouse key used for input (left, middle, or right)
MouGetNumButtons Return the number of buttons that the mouse driver supports
MouGetNumMickeys Return the number of "Mickeys" per centimeter for the current mouse driver
MouGetNumQueEl Return the status of the event queue for the current mouse device driver
33H 03H MouGetPtrPos Return the current row and column of the mouse pointer shape
MouGetPtrShape Obtain the current mouse pointer shape
MouGetScaleFact Return the current scaling factors for the mouse pointer shape
MouInitReal Initialize the mouse real-mode pointer
33H 00H MouOpen Open a mouse device driver for the current screen group. Return a device handle
33H 05H,06H MouReadEventQue Read and remove an event from the current mouse driver event queue
MouRegister Register a mouse subsystem for use with the current screen group
33H 02H MouRemovePtr Restrict a screen area from use by the mouse pointer
MouSetDevStatus Set the current mouse device driver status flags
33H 0CH MouSetEventMask Assign an event mask to the current mouse device driver
MouSetHotKey Define which button (left, middle, or right) serves as the hot key for the current mouse driver
33H 04H MouSetPtrPos Set the mouse pointer screen coordinates
33H 09H,0AH MouSetPtrShape Set the mouse pointer shape
MouSetScaleFact Set the scaling factor for the mouse pointer shape
MouShellInit Mouse shell indentifies itself to the mouse router
MouSynch Direct mouse subsystems to synchronize access to the mouse device driver
API INT SUBCODE FUNCTION DESCRIPTION
VioDeRegister Remove a previously registered video subsystem from a screen group
VioEndPopUp Remove a temporary window created by VioPopUp that is no longer required
VioGetAnsi Specify whether ANSI support is on or off for the current video buffer
F VioGetBuf Return the address of the logical (process unique) video buffer specified
VioGetCP Return the code-page used for display by the specified handle
VioGetConfig Return the current video display configuration
F 10H 03H VioGetCurPos Return the current row and column cursor position for the specified logical video buffer
F VioGetCurType Return the cursor type and attributes for the specified logical video buffer
VioGetFont Return the current font for the specified logical video buffer
F 10H 0FH VioGetMode Return the current video mode for the specified logical video buffer
F VioGetPhysBuf Return the address of the physical video buffer
VioGetState Return the current video states, or the palette registers, the border color, or background intensity
VioModeUndo Allow one process thread to cancel a VioModeWait service issued by another thread in the same process
VioModeWait Request that a graphics mode application be notified each time it needs to restore its video mode
VioPopUp Allocate a temporary popup display screen for message display
VioPrtSc Print the current screen contents
VioPrtScToggle The OS/2 session manager invokes this routine each time the user presses the Shift-PrtSc key combination
F 10H 08H VioReadCellStr Read a string of characters and attributes from the screen starting at a specified row and column location
F VioReadCharStr Read a character string from the display starting at ther specified row and column
VioRegister Register a video subsystem with a specific screen group
VioSavRedraw Request that a process be notified when it must save or redraw its contents
VioSavRedrawUndo Allow one thread in a process to cancel a
VioSavRedrawWait service issued by another thread within the same process
F 10H 07H VioScrollDn Scroll the screen contents down as specified by the row and column numbers and number of lines to scroll
VioScrLock Lock the screen and prevent I/O operations
F VioScrollLf Scroll the screen contents to the left as specified
F VioScrollRt Scroll the screen contents to the right as specified
F 10H 06H VioScrollUp Scroll the screen contents up as specified by the row and column numbers and number of lines to scroll
VioScrUnlock Unlock the screen for I/O operations
VioSetAnsi Enable or disable ANSI support for the specified logical video buffer
VioSetCP Set the code-page for the specified logical video buffer
VioSetCurPos Set the cursor position to the row and column of the logical video buffer provided
F 10H 02H VioSetCurType Set the cursor type (attributes) for the logical video display provided
VioSetFont Set the font for the logical video display
F 10H 00H VioSetMode Set the display mode for the logical video display provided
10H 0BH VioSetState Set the state for the palette registers, border color, or background intensity for the specified logical video display
F VioShowBuf Update the physical display with the contents of a logical display buffer
F 10H 09H VioWrtCellStr Write a character string (with attributes) to the specified video display location
F 10H 0AH VioWrtCharStr Write a character string to the specified vidoe display location
F VioWrtCharStrAtt Write a character string using a repeated attribute to the specified video display
F VioWrtNAttr Write the character attribute to the video display at the specified location. This service provides an optional repeat count
F VioWrtNCell Write a character or attribute to the video display the specified number of times
F VioWrtNChar Write a character to the video display starting at the specified location and repeating the display n times
F 10H 0EH VioWrtTty Write a character string to the video display starting at the current cursor position in TTY mode