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 being executed. A task is a single Windows application call. Following are the task functions:

Function Description

Catch Copies the current execution environment to a buffer.
ExitWindows Initiates the standard Windows shutdown procedure.
GetCurrentPDB Returns the current MS-DOS program database (PDB), also known as the program segment prefix (PSP).
GetCurrentTask Returns the handle of the current task.
GetDOSEnvironment Retrieves the environment string of the currently running task.
GetNumTasks Returns the number of tasks currently being executed in the system.
IsTask Determines whether a task handle is valid.
SetErrorMode Controls whether Windows handles MS-DOS Function 24h errors or allows the calling application to handle them.
Throw Restores the execution environment to the specified values.
Yield Stops the current task and starts any waiting task.