Control Program Functions
From EDM2
Some general information is available at Control Program page.
File Management
File Functions
- DosClose - Closes a file handle
- DosCopy - Copies a file or subdirectory
- DosDelete - Deletes a file
- DosEditName - Transforms a file name
- DosMove - Moves a file or subdirectory
- DosOpen - Gets a handle to a file, pipe, or device
- DosRead - Reads from a file, pipe, or device
- DosSetFileInfo - Sets information for an open file
- DosSetFileLocks - Locks and unlocks a range in a file
- DosSetFilePtr - Moves the position of the file pointer
- DosSetFileSize - Changes the size of a file
- DosSetPathInfo - Sets information for a file or subdirectory
- DosSetVerify - Enables write verification
- DosWrite - Writes data to a file, pipe, or device
File Handle Functions
- DosDupHandle - Duplicates a file handle
- DosQueryFHState - Gets the file handle state
- DosQueryHType - Gets the handle type
- DosSetFHState - Sets the file handle state
- DosSetMaxFH - Sets the maximum number of file handles
File Query Functions
- DosEnumAttribute - Gets the name and size of a file object's extended attributes
- DosQueryFileInfo - Gets information for an open file
- DosQueryPathInfo - Gets information for a file or subdirectory
- DosQuerySysInfo - Gets values of system variables
- DosQueryVerify - Determines whether or not write verification is enabled
Directory Search (FileFind) Functions
- DosFindClose - Ends a search for matching file objects
- DosFindFirst - Begins a search for matching file objects
- DosFindNext - Continues a search for matching file objects
Directory and Disk Functions
- DosCreateDir - Creates a subdirectory
- DosDeleteDir - Deletes an empty subdirectory
- DosQueryCurrentDir - Gets the current directory
- DosQueryCurrentDisk - Gets the current drive
- DosSetCurrentDir - Sets the current directory
- DosSetDefaultDisk - Sets the default drive
Environment and Search Path Functions
- DosScanEnv - Gets information for a file or subdirectory
- DosSearchPath - Scans environment variable
- DosQueryPathInfo - Searches along a specified path
- DosSetPathInfo - Sets information for a file or subdirectory
Extended LIBPATH Search Path Functions
- DosQueryExtLIBPATH - Queries the search path for Dynamic Link Library, which is either before or after LIBPATH search
- DosSetExtLIBPATH - Sets a search path for Dynamic Link Library, either before or after LIBPATH search
Memory Management
Memory Functions
- DosAllocMem - Allocates a private memory object within the virtual address space
- DosFreeMem - Frees a private or shared memory object from the virtual address space of the process
- DosQueryMem - Obtains information about a range of pages within the virtual address space of the subject process
- DosSetMem - Commits or decommits a range of pages within a memory object, or alters their protection
Memory Suballocation Functions
- DosSubAllocMem - Suballocates a block of memory from a heap that was previously initialized
- DosSubFreeMem - Frees a block of memory that was previously suballocated
- DosSubSetMem - Initializes a heap for suballocation, or increases the size of a previously initialized heap
- DosSubUnsetMem - Terminates the use of a heap
- DosAllocSharedMem - Allocates a shared memory object within the virtual address space
- DosGetNamedSharedMem - Obtains access to an existing named shared memory object
- DosGetSharedMem - Obtains access to an existing shared memory object
- DosGiveSharedMem - Gives a target process access to an existing shared memory object
Thread Local Memory Functions
- DosAllocThreadLocalMemory - Allocates a block of memory that is unique, or local, to a thread
- DosFreeThreadLocalMemory - Frees a block of thread-local memory
Program Execution Control
Thread Control Functions
- DosCreateThread
- DosEnterCritSec
- DosExit - Terminates thread execution in the current process
- DosExitCritSec - Enables thread switching for the current process
- DosGetInfoBlocks
- DosKillThread
- DosResumeThread
- DosSetPriority
- DosSuspendThread
- DosWaitThread
Process Control Functions
- DosExecPgm - Executes another program as a child process
- DosExitList - Defines a list of routines to be executed when the current process ends
- DosKillProcess
- DosWaitChild - Waits for a child process to end
Session Control Functions
- DosSelectSession - Selects a child session
- DosSetSession - Sets the status of a child session
- DosStartSession - Starts an unrelated or child session
- DosStopSession - Terminates one or all child sessions
Semaphore Functions
Event Semaphore Functions
- DosCloseEventSem - Closes an event semaphore
- DosCreateEventSem - Creates an event semaphore
- DosOpenEventSem - Opens an event semaphore for use
- DosPostEventSem - Posts an event semaphore
- DosQueryEventSem
- DosResetEventSem - Resets an event semaphore
- DosWaitEventSem
Mutex Semaphore Functions
- DosCloseMutexSem
- DosCreateMutexSem
- DosOpenMutexSem
- DosQueryMutexSem
- DosReleaseMutexSem
- DosRequestMutexSem
Muxwait Semaphore Functions
- DosAddMuxWaitSem
- DosCloseMuxWaitSem
- DosCreateMuxWaitSem
- DosDeleteMuxWaitSem
- DosOpenMuxWaitSem
- DosQueryMuxWaitSem
- DosWaitMuxWaitSem - Waits for a muxwait semaphore to clear
Pipe Functions
Named-Pipe Functions
- DosCallNPipe
- DosConnectNPipe
- DosCreateNPipe - Creates a named pipe
- DosDisConnectNPipe
- DosPeekNPipe
- DosQueryNPHState
- DosQueryNPipeInfo
- DosQueryNPipeSemState
- DosSetNPHState - Resets the blocking mode and the read mode of a named pipe
- DosSetNPipeSem - Attaches a shared event semaphore to a local named pipe
- DosTransactNPipe - Writes to a duplex message pipe, then reads from it
- DosWaitNPipe - Waits for an instance of a named pipe to become available
Unnamed-Pipe Functions
- DosClose - Closes a file or pipe
- DosCreatePipe - Creates an unnamed (anonymous) pipe
- DosDupHandle, DosOpen, DosRead, DosWrite
Queue Functions
- DosCloseQueue - Closes a queue
- DosCreateQueue - Creates a queue
- DosOpenQueue - Opens a queue
- DosPeekQueue
- DosPurgeQueue
- DosQueryQueue - Returns the number of elements in a queue
- DosReadQueue
- DosWriteQueue - Writes an element to a queue
Timer Functions
- DosAsyncTimer
- DosSleep - Suspends the current thread for a specified time interval
- DosStartTimer
- DosStopTimer
Error Management Functions
- DosErrClass
- DosError - Disables and enables hard-error and exception pop-up messages
Exception Handling Functions
- DosRaiseException - Raises an exception
- DosSetExceptionHandler - Registers an exception handler
- DosUnsetExceptionHandler
- DosUnwindException
Signal Exception Functions
- DosAcknowledgeSignalException
- DosSendSignalException
- DosSetSignalExceptionFocus - Sets keyboard signal focus
Must-Complete Functions
- DosEnterMustComplete - Enters a must-complete section of code
- DosExitMustComplete - Exits a must-complete section of code
Device I/O Functions
File System Functions Used to Perform I/O to Devices:
- DosClose
- DosOpen
- DosRead
- DosWrite
Message Management Functions
- DosGetMessage - Retrieves a message from a message file
- DosInsertMessage - Inserts variable text into message
- DosPutMessage - Sends a message to an output file or device
- DosQueryMessageCP - Retrieves a message file list of code pages and language identifiers
Code Page Management Functions
Code Page Functions
- DosQueryCp
- DosSetProcessCp - Sets the code page of a process
Country Dependent Functions
- DosMapCase
- DosQueryCollate
- DosQueryCtryInfo
- DosQueryDBCSEnv
- DosQueryMessageCP
Debugging Functions
- DosDebug - Used by one process to control another for debugging purposes
Dynamic Linking Functions
- DosFreeModule - Frees the reference to the dynamic link module for the process
- DosLoadModule - Loads a dynamic link module, and returns a handle for the module
- DosQueryModuleHandle
- DosQueryModuleName
- DosQueryProcAddr - Returns the address of the specified procedure within a dynamic link module
Dos...
Unsorted
Date/Time
Timer
Error Management
Exception Management
Large File System
- DosCancelLockRequestL
- DosListIOL - Performs the specified number of seek/read or seek/write operations
- DosOpenL - Opens a file
- DosProtectOpenL - Opens a file returning a protected file handle
- DosProtectSetFileLocksL - Locks and unlocks a range of an open file
- DosProtectSetFilePtrL - Moves the read or write pointer
- DosProtectSetFileSizeL - Changes the size of a file
- DosSetFileLocksL - Locks and unlocks a range of an open file
- DosSetFilePtrL - Moves the read or write pointer
- DosSetFileSizeL - Changes the size of a file
File Manipulation
- DosCancelLockRequest
- DosProtectClose
- DosForceDelete
- DosProtectOpen
- DosReplaceModule
- DosProtectRead
- DosProtectSetFileInfo
- DosProtectSetFileLocks
- DosProtectSetFilePtr
- DosProtectSetFileSize
- DosProtectWrite
File Handle Manipulation
File Querying
- DosProtectEnumAttribute
- DosQueryFileMode
- DosProtectQueryFileInfo
- DosQuerySysState
- DosPerfSysCall
- DosGetProcessorStatus
- DosSetProcessorStatus
- DosQueryABIOSSupport
File System Functions
Resource Management
Threads
VDD
Kbd, Mou, Vio
Keyboard functions
- KbdCharIn
- KbdGetConsole
- KbdPeek
- KbdStringIn
- KbdFlushBuffer
- KbdSetStatus
- KbdGetStatus
- KbdSetCp
- KbdGetCp
- KbdGetLayout
- KbdGetLayoutUni
- KbdSetLayout
- KbdSetLayoutUni
- KbdGetHWID
- KbdXlate
Mouse functions
- MouFlushQue
- MouGetPtrPos
- MouSetPtrPos
- MouSetPtrShape
- MouGetPtrShape
- MouGetDevStatus
- MouGetNumButtons
- MouGetNumMickeys
- MouReadEventQue
- MouGetNumQueEl
- MouGetEventMask
- MouSetEventMask
- MouGetScaleFact
- MouSetScaleFact
- MouRemovePtr
- MouDrawPtr
- MouSetDevStatus
- MouGetThreshold
- MouSetThreshold
Video I/O functions
- VioGetBuf
- VioGetCurPos
- VioSetCurPos
- VioGetCurType
- VioSetCurType
- VioGetMode
- VioSetMode
- VioReadCellStr
- VioReadCharStr
- VioWrtCellStr
- VioWrtCharStr
- VioScrollUp
- VioScrollDown
- VioScrollLeft
- VioScrollRight
- VioWrtNAttr
- VioWrtNCell
- VioWrtNChar
- VioWrtTTY
- VioWrtCharStrAtt
- VioShowBuf
- VioSetAnsi
- VioGetAnsi
- VioSavRedrawWait
- VioSavRedrawUndo
- VioModeWait
- VioModeUndo
- VioScrLock
- VioScrUnLock
- VioPopUp
- VioEndPopUp
- VioGetConfig
- VioGetCp
- VioSetCp
- VioGetOrigin
- VioSetOrigin
- VioGetState
- VioSetState
Advanced VIO
- VioAssociate
- VioCreateLogFont
- VioCreatePS
- VioDeleteSetId
- VioDestroyPS
- VioGetDeviceCellSize
- VioQueryFonts
- VioQuerySetIds
- VioSetDeviceCellSize
- VioShowPS
OS/2 1.x Functions
Function calls for OS/2 1.x that offer compatibility with DOS via Family API or Windows NT OS/2 subsystem.
Dos
Date/Time
Device I/O
Dynamic Linking Library
Monitor functions
Error Management
OS/2 2.0 and 1.3 only:
Exception Management
File Systems/File Management
Directory Searching:
Directory Handling:
Disk
Environment/Path
File Manipulation
- DosChgFilePtr
- DosClose
- DosCopy
- DosDelete
- DosEditName
- DosFileLocks
- DosMove
- DosOpen
- DosOpen2
- DosRead
- DosReadAsync
- DosSetFileInfo
- DosSetPathInfo
- DosSetVerify
- DosWrite
- DosWriteAsync
- DosNewSize
- DosSetFileMode
File Handle Manipulation
File Querying
File System Functions
Memory Management
- DosAllocSeg
- DosAllocShrSeg
- DosFreeSeg
- DosGetSeg
- DosGetShrSeg
- DosGiveSeg
- DosLockSeg
- DosMemAvail
- DosSizeSeg
- DosUnlockSeg
- DosReallocSeg
- Huge block
- Heap
Message Management
National Language/Code Page
Named Pipes
- DosCallNmPipe -
- DosConnectNmPipe - enables named pipe to be opened
- DosDisConnectNmPipe
- DosMakeNmPipe
- DosMakePipe
- DosPeekNmPipe
- DosQNmPipeInfo
- DosQNmPipeSemState
- DosQNmPHandState
- DosRawReadNPipe
- DosRawWriteNPipe
- DosSetNmPHandState
- DosSetNmPipeSem
- DosTransactNmPipe
- DosWaitNmPipe
Resource Management
Semaphores
- DosCloseSem
- DosCreateSem
- DosFSRamSemClear
- DosFSRamSemRequest
- DosOpenSem
- DosSemClear
- DosSemRequest
- DosSemSet
- DosSemSetWait
- DosSemWait
- DosPMSemWait
MuxWait Semaphores
Processes/Threading
Processes
- DosCWait
- DosEnterCritSec
- DosExitCritSec
- DosExitList
- DosExecPgm
- DosFlagProcess
- DosGetInfoSeg
- DosGetPID
- DosGetPPID
- DosKillProcess
Session Management
- Session Manager
- DosSMDoAppReq
- DosSMGetAppReq
- DosSMGetStatus
- DosSMHDEInit
- DosSMInitialize
- DosSMNotifyDD
- DosSMNotifyDD2
- DosSMOpenDD
- DosSMParentSwitch
- DosSMPause
- DosSMPMPresent
- DosSMRealPrtSc
- DosSMRegisterDD
- DosSMServeAppReq
- DosSMSetSessionType
- DosSMSetTitle
- DosSMStart
- DosSMSwitch
- DosSMSysInit
- DosSMTerminate
- Screen Group
- DosGetTimes
- DosScrUnlock
- DosScrLock
- DosSavRedrawWait
- DosSavRedrawUndo
- DosSetMNLockTime
- DosModeUndo
- DosModeWait
- DosRegisterNotification
Timer
Addressing
Spool
Not found on OS2TK45
I/O Privileges
Segments
QuickHelp
Keyboard functions
- KbdCharIn - character data record from keyboard
- KbdClose - closes logical keyboard
- KbdDeRegister - deregister keyboard subsystem
- KbdFlushBuffer -
- KbdFreeFocus
- KbdGetCp
- KbdGetFocus -
- KbdGetHWId
- KbdGetStatus -
- KbdInit -
- KbdOpen -
- KbdPeek -
- KbdRegister
- KbdSetCp
- KbdSetCustXt
- KbdSetFgnd
- KbdSetHWID
- KbdSetStatus
- KbdSynch -
- KbdStringIn
- KbdXlate
Mouse functions
- MouRegister
- MouDeRegister
- MouOpen
- MouClose
- MouInitReal
- MouSynch
- MouDrawPtr
- MouFlushQue
- MouGetDevStatus
- MouGetEventMask
- MouGetNumButtons
- MouGetNumMickeys
- MouGetNumQueEl
- MouGetPtrPos
- MouGetPtrShape
- MouGetScaleFact
- MouReadEventQue
- MouRemovePtr
- MouSetDevStatus
- MouSetEventMask
- MouSetPtrPos
- MouSetPtrShape
- MouSetScaleFact
- MouShellInit
- MouGetHotKey
- MouSetHotKey
- MouFree
Video I/O functions
- VioCheckCharType
- VioDeRegister
- VioEndPopUp
- VioGetAnsi
- VioGetBuf
- VioGetConfig
- VioGetCp
- VioGetCurPos
- VioGetCurType
- VioGetFont
- VioGetMode
- VioGetPhysBuf
- VioGetState
- VioGlobalReg
- VioModeUndo
- VioModeWait
- VioPopUp
- VioPrtSc
- VioPrtScToggle
- VioQueryConsole
- VioReadCellStr
- VioReadCharStr
- VioRedrawSize
- VioRegister
- VioSavRedrawUndo
- VioSavRedrawWait
- VioSetFont
- VioScrLock
- VioScrollDn
- VioScrollLf
- VioScrollRt
- VioScrollUp
- VioScrUnLock
- VioSetAnsi
- VioSetCp
- VioSetCurPos
- VioSetCurType
- VioSetMode
- VioSetState
- VioShowBuf
- VioWrtCellStr
- VioWrtCharStr
- VioWrtCharStrAtt
- VioWrtNAttr
- VioWrtNCell
- VioWrtNChar
- VioWrtTTY
References
- IBM OS/2 Programming Reference
- IBM OS/2 Warp Control Program Programming Guide and Reference (1996)
- IBM API Addendum Volume 1 (PowerPC Edition)