3.5 Task Functions

Task functions alter the execution status of tasks, return information associated with a task, and retrieve information about the environment in which the task is executing. A task is a single Windows application call. The following list briefly describes each task function:

Function Description  
Catch Copies the current execution environment to a buffer.  
ExitWindows Initiates the standard Windows shutdown procedure.  
Function Description  
GetCurrentPDB Returns the current DOS Program Data Base (PDB), also known as the Program Segment Prefix (PSP).  
GetCurrentTask Returns the task handle of the current task.  
GetDOSEnvironment Retrieves the environment string of the currently running task.  
GetNumTasks Returns the number of tasks currently executing in the system.  
SetErrorMode Controls whether Windows handles DOS Function 24H errors or allows the calling application to handle them.  
Throw Restores the execution environment to the specified values.  
Yield Halts the current task and starts any waiting task.