Jump to content

Control Program Functions (Summary): Difference between revisions

From EDM2
 
(10 intermediate revisions by the same user not shown)
Line 35: Line 35:


===Directory Search (FileFind) Functions===
===Directory Search (FileFind) Functions===
*[[DosFindClose]] - Ends a search for matching file objects
*[[DosFindClose]]
*[[DosFindFirst]] - Begins a search for matching file objects
*[[DosFindFirst]]
*[[DosFindNext]] - Continues a search for matching file objects
*[[DosFindNext]]


===Directory and Disk Functions===
===Directory and Disk Functions===
*[[DosCreateDir]] - Creates a subdirectory
*[[DosCreateDir]]
*[[DosDeleteDir]] - Deletes an empty subdirectory
*[[DosDeleteDir]]
*[[DosQueryCurrentDir]] - Gets the current directory
*[[DosQueryCurrentDir]]
*[[DosQueryCurrentDisk]] - Gets the current drive
*[[DosQueryCurrentDisk]]
*[[DosSetCurrentDir]] - Sets the current directory
*[[DosSetCurrentDir]]
*[[DosSetDefaultDisk]] - Sets the default drive
*[[DosSetDefaultDisk]]


===Environment and Search Path Functions===
===Environment and Search Path Functions===
*[[DosScanEnv]] - Gets information for a file or subdirectory
*[[DosScanEnv]]
*[[DosSearchPath]] - Scans environment variable
*[[DosSearchPath]]
*DosQueryPathInfo - Searches along a specified path
*[[DosQueryPathInfo]]
*DosSetPathInfo - Sets information for a file or subdirectory
*[[DosSetPathInfo]]


===Extended LIBPATH Search Path Functions===
===Extended LIBPATH Search Path Functions===
*[[DosQueryExtLIBPATH]] - Queries the search path for Dynamic Link Library, which is either before or after LIBPATH search
*[[DosQueryExtLIBPATH]]
*[[DosSetExtLIBPATH]] - Sets a search path for Dynamic Link Library, either before or after LIBPATH search
*[[DosSetExtLIBPATH]]


==Memory Management==
==Memory Management==
===Memory Functions===
===Memory Functions===
*[[DosAllocMem]] - Allocates a private memory object within the virtual address space
*[[DosAllocMem]]
*[[DosFreeMem]] - Frees a private or shared memory object from the virtual address space of the process
*[[DosFreeMem]]
*[[DosQueryMem]] - Obtains information about a range of pages within the virtual address space of the subject process
*[[DosQueryMem]]
*[[DosSetMem]] - Commits or decommits a range of pages within a memory object, or alters their protection
*[[DosSetMem]]


===Memory Suballocation Functions===
===Memory Suballocation Functions===
*[[DosSubAllocMem]] - Suballocates a block of memory from a heap that was previously initialized
*[[DosSubAllocMem]]
*[[DosSubFreeMem]] - Frees a block of memory that was previously suballocated
*[[DosSubFreeMem]]
*[[DosSubSetMem]] - Initializes a heap for suballocation, or  increases the size of a previously initialized heap
*[[DosSubSetMem]]
*[[DosSubUnsetMem]] - Terminates the use of a heap
*[[DosSubUnsetMem]]


===Shared Memory Functions===
===Shared Memory Functions===
*[[DosAllocSharedMem]] - Allocates a shared memory object within the virtual address space
*[[DosAllocSharedMem]]
*[[DosGetNamedSharedMem]] - Obtains access to an existing named shared memory object
*[[DosGetNamedSharedMem]]
*[[DosGetSharedMem]] - Obtains access to an existing shared memory object
*[[DosGetSharedMem]]
*[[DosGiveSharedMem]] - Gives a target process access to an existing shared memory object
*[[DosGiveSharedMem]]


===Thread Local Memory Functions===
===Thread Local Memory Functions===
*[[DosAllocThreadLocalMemory]] - Allocates a block of memory that is unique, or local, to a thread
*[[DosAllocThreadLocalMemory]]
*[[DosFreeThreadLocalMemory]] - Frees a block of thread-local memory
*[[DosFreeThreadLocalMemory]]


==Program Execution Control==
==Program Execution Control==
Line 84: Line 84:
*[[DosCreateThread]]
*[[DosCreateThread]]
*[[DosEnterCritSec]]
*[[DosEnterCritSec]]
*[[DosExit]] - Terminates thread execution in the current process
*[[DosExit]]
*[[DosExitCritSec]] - Enables thread switching for the current process
*[[DosExitCritSec]]
*[[DosGetInfoBlocks]]
*[[DosGetInfoBlocks]]
*[[DosKillThread]]
*[[DosKillThread]]
Line 94: Line 94:


===Process Control Functions===
===Process Control Functions===
*[[DosExecPgm]] - Executes another program as a child process
*[[DosExecPgm]]
*[[DosExitList]] - Defines a list of routines to be executed when the current process ends
*[[DosExitList]]
*[[DosKillProcess]]
*[[DosKillProcess]]
*[[DosWaitChild]] - Waits for a child process to end
*[[DosWaitChild]]


===Session Control Functions===
===Session Control Functions===
*[[DosSelectSession]]
*[[DosSelectSession]]
*[[DosSetSession]] - Sets the status of a child session
*[[DosSetSession]]
*[[DosStartSession]] - Starts an unrelated or child session
*[[DosStartSession]]
*[[DosStopSession]] - Terminates one or all child sessions
*[[DosStopSession]]


==Semaphore Functions==
==Semaphore Functions==
Line 130: Line 130:
*[[DosOpenMuxWaitSem]]
*[[DosOpenMuxWaitSem]]
*[[DosQueryMuxWaitSem]]
*[[DosQueryMuxWaitSem]]
*[[DosWaitMuxWaitSem]] - Waits for a muxwait semaphore to clear
*[[DosWaitMuxWaitSem]]


==Pipe Functions==
==Pipe Functions==
Line 136: Line 136:
*[[DosCallNPipe]]
*[[DosCallNPipe]]
*[[DosConnectNPipe]]
*[[DosConnectNPipe]]
*[[DosCreateNPipe]] - Creates a named pipe
*[[DosCreateNPipe]]
*[[DosDisConnectNPipe]]
*[[DosDisConnectNPipe]]
*[[DosPeekNPipe]]
*[[DosPeekNPipe]]
Line 142: Line 142:
*[[DosQueryNPipeInfo]]
*[[DosQueryNPipeInfo]]
*[[DosQueryNPipeSemState]]
*[[DosQueryNPipeSemState]]
*[[DosSetNPHState]] - Resets the blocking mode and the read mode of a named pipe
*[[DosSetNPHState]]
*[[DosSetNPipeSem]] - Attaches a shared event semaphore to a local named pipe
*[[DosSetNPipeSem]]
*[[DosTransactNPipe]] - Writes to a duplex message pipe, then reads from it
*[[DosTransactNPipe]]
*[[DosWaitNPipe]] - Waits for an instance of a named pipe to become available
*[[DosWaitNPipe]]


===Unnamed-Pipe Functions===
===Unnamed-Pipe Functions===
*DosClose - Closes a file or pipe
*[[DosClose]]
*[[DosCreatePipe]] - Creates an unnamed (anonymous) pipe
*[[DosCreatePipe]]
*DosDupHandle, DosOpen, DosRead, DosWrite
*[[DosDupHandle]]
*[[DosOpen]]
*[[DosRead]]
*[[DosWrite]]


==Queue Functions==
==Queue Functions==
*[[DosCloseQueue]] - Closes a queue
*[[DosCloseQueue]]
*[[DosCreateQueue]] - Creates a queue
*[[DosCreateQueue]]
*[[DosOpenQueue]] - Opens a queue
*[[DosOpenQueue]]
*[[DosPeekQueue]]
*[[DosPeekQueue]]
*[[DosPurgeQueue]]
*[[DosPurgeQueue]]
*[[DosQueryQueue]] - Returns the number of elements in a queue
*[[DosQueryQueue]]
*[[DosReadQueue]]
*[[DosReadQueue]]
*[[DosWriteQueue]] - Writes an element to a queue
*[[DosWriteQueue]]  


==Timer Functions==
==Timer Functions==
*[[DosAsyncTimer]]
*[[DosAsyncTimer]]
*[[DosSleep]] - Suspends the current thread for a specified time interval
*[[DosSleep]]
*[[DosStartTimer]]
*[[DosStartTimer]]
*[[DosStopTimer]]
*[[DosStopTimer]]
Line 170: Line 173:
==Error Management Functions==
==Error Management Functions==
*[[DosErrClass]]
*[[DosErrClass]]
*[[DosError]] - Disables and enables hard-error and exception pop-up messages
*[[DosError]]


==Exception Handling Functions==
==Exception Handling Functions==
*[[DosRaiseException]] - Raises an exception
*[[DosRaiseException]]
*[[DosSetExceptionHandler]] - Registers an exception handler
*[[DosSetExceptionHandler]]
*[[DosUnsetExceptionHandler]]
*[[DosUnsetExceptionHandler]]
*[[DosUnwindException]]
*[[DosUnwindException]]
Line 181: Line 184:
*[[DosAcknowledgeSignalException]]
*[[DosAcknowledgeSignalException]]
*[[DosSendSignalException]]
*[[DosSendSignalException]]
*[[DosSetSignalExceptionFocus]] - Sets keyboard signal focus
*[[DosSetSignalExceptionFocus]]


===Must-Complete Functions===
===Must-Complete Functions===
*[[DosEnterMustComplete]] - Enters a must-complete section of code
*[[DosEnterMustComplete]]
*[[DosExitMustComplete]] - Exits a must-complete section of code
*[[DosExitMustComplete]]


==Device I/O Functions==
==Device I/O Functions==
Line 200: Line 203:


==Message Management Functions==
==Message Management Functions==
*[[DosGetMessage]] - Retrieves a message from a message file
*[[DosGetMessage]]
*[[DosInsertMessage]] - Inserts variable text into message
*[[DosInsertMessage]]
*[[DosPutMessage]] - Sends a message to an output file or device
*[[DosPutMessage]]
*[[DosQueryMessageCP]] - Retrieves a message file list of code pages and language identifiers
*[[DosQueryMessageCP]]


==Code Page Management Functions==
==Code Page Management Functions==
===Code Page Functions===
===Code Page Functions===
*[[DosQueryCp]]
*[[DosQueryCp]]
*[[DosSetProcessCp]] - Sets the code page of a process
*[[DosSetProcessCp]]


===Country Dependent Functions===
===Country Dependent Functions===
Line 215: Line 218:
*[[DosQueryCtryInfo]]
*[[DosQueryCtryInfo]]
*[[DosQueryDBCSEnv]]
*[[DosQueryDBCSEnv]]
*DosQueryMessageCP
*[[DosQueryMessageCP]]


==Debugging Functions==
==Debugging Functions==
*[[DosDebug]] - Used by one process to control another for debugging purposes
*[[DosDebug]]


==Dynamic Linking Functions==
==Dynamic Linking Functions==
*[[DosFreeModule]] - Frees the reference to the dynamic link module for the process
*[[DosFreeModule]]
*[[DosLoadModule]] - Loads a dynamic link module, and returns a handle for the module
*[[DosLoadModule]]
*[[DosQueryModuleHandle]]
*[[DosQueryModuleHandle]]
*[[DosQueryModuleName]]
*[[DosQueryModuleName]]
*[[DosQueryProcAddr]] - Returns the address of the specified procedure within a dynamic link module
*[[DosQueryProcAddr]]


==Dos...==
==Dos...==
Line 427: Line 430:
===Dos===
===Dos===
====Date/Time====
====Date/Time====
*[[DosGetDateTime (Legacy)|DosGetDateTime]]
*[[DosGetDateTime (OS/2 1.x)|DosGetDateTime]]
*[[DosSetDateTime (Legacy)|DosSetDateTime]]
*[[DosSetDateTime (OS/2 1.x)|DosSetDateTime]]


====Device I/O====
====Device I/O====
*[[DosBeep (Legacy)|DosBeep]]
*[[DosBeep (OS/2 1.x)|DosBeep]]
*[[DosDevConfig (Legacy)|DosDevConfig]]
*[[DosDevConfig (OS/2 1.x)|DosDevConfig]]
*[[DosDevIOCtl (FAPI)|DosDevIOCtl]]
*[[DosDevIOCtl (FAPI)|DosDevIOCtl]]
*[[DosDevIOCtl2]]
*[[DosDevIOCtl2]]
Line 814: Line 817:


</div>
</div>
===Undocumented / To Verify===
*[[DosGetProcessorCount]]
*[[DosGetProcessorIdleTime]]


===Legend===
===Legend===
* [[image:Vraag.gif]]: More information is required on this function. Information was not available on CP1 or PRCP books.
* [[image:Vraag.gif]]: More information is required on this function. Information was not available on CP1 or PRCP books.


==References==
==References==

Latest revision as of 00:56, 19 May 2025

Some general information is available at Control Program page.

File Management

File Functions

File Handle Functions

File Query Functions

Directory Search (FileFind) Functions

Directory and Disk Functions

Environment and Search Path Functions

Extended LIBPATH Search Path Functions

Memory Management

Memory Functions

Memory Suballocation Functions

Shared Memory Functions

Thread Local Memory Functions

Program Execution Control

Thread Control Functions

Process Control Functions

Session Control Functions

Semaphore Functions

Event Semaphore Functions

Mutex Semaphore Functions

Muxwait Semaphore Functions

Pipe Functions

Named-Pipe Functions

Unnamed-Pipe Functions

Queue Functions

Timer Functions

Error Management Functions

Exception Handling Functions

Signal Exception Functions

Must-Complete Functions

Device I/O Functions

File System Functions Used to Perform I/O to Devices:

  • DosClose
  • DosOpen
  • DosRead
  • DosWrite

Message Management Functions

Code Page Management Functions

Code Page Functions

Country Dependent Functions

Debugging Functions

Dynamic Linking Functions

Dos...

Unsorted

Date/Time

Timer

Error Management

Exception Management

File Systems/File Management

Large File System

File Manipulation

File Handle Manipulation

File Querying

File System Functions

Resource Management

Threads

VDD

Kbd, Mou, Vio

Keyboard functions

Mouse functions

Video I/O functions

Advanced VIO

Icon Legend

  • : It seems that these functions were not implemented on the OS/2 4.5 Toolkit.
  • : These functions were documented on the Addendum of the OS/2 4.5 Toolkit.
  • : More information is required on this function.

OS/2 1.x / Legacy 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

File Handle Manipulation

File Querying

File System Functions

Memory Management

Huge block
Heap

Message Management

National Language/Code Page

Named Pipes

Resource Management

Semaphores

MuxWait Semaphores

Processes/Threading

Processes

Session Management

Session Manager
Screen Group

Timer

Addressing

Spool

Not found on OS2TK45

I/O Privileges

Segments

QuickHelp

Keyboard functions

Mouse functions

Video I/O functions

Undocumented / To Verify

Legend

  • : More information is required on this function. Information was not available on CP1 or PRCP books.

References