Pause – Function 18
This function causes your application to wait for a specified amount of time.
Prerequisite functions
None.
Function call
WinHLLAPI(PAUSE,lpbyString,lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String NA
Data Length Amount of time to pause in multiples of 0.5 seconds. For example, a value of 240 signifies 2 minutes (120 seconds).
PS Position NA
Return code
Code Description
WHLLOK Pause completed (specified wait time has expired).
WHLLSYSERROR The function failed due to a system error. Any time results are unpredictable.
WHLLPSCHANGED The OIA or presentation space of the Host session has been updated. Use Query Host Update (function 24) for more information.
Remarks
You should use the Windows environment timer facility, WM_TIMER, instead of timing loops to wait for an event to occur. Note that by calling Start Host Notification (function 23) before this function, a Host event can terminate the Pause. When this happens, call Query Host Update (function 24) to determine which session had the update and the type of update.
This function is affected by the FPAUSE/IPAUSE session options. See Set Session Parameters (function 9) for details. If IPAUSE is set, the pending Host event satisfies the Pause call until Query Host Update (function 24) is completed.