WinHLLAPICancelAsyncRequest

Top  Previous  Next

This function cancels an outstanding asynchronous function launched by a call to WinHLLAPIAsync().

 

Syntax

 

int WinHLLAPICancelAsyncRequest (HANDLE hAsyncTask, WORD wFunction)

 

 

Parameters

 

hAsyncTask

 

The handle returned by WinHLLAPIAsync() when the function was initiated.

 

wFunction

 

The function number of the asynchronous task to cancel. Because this parameter is required for revision 1.1 but not in 1.0, it is optional.

 

With this function, any asynchronous task previously initiated by a call to WinHLLAPIAsync() may be canceled while still outstanding.

 

Returns

 

The return value indicates if the specified function was, in fact, canceled. If the function was canceled then the return value is WHLLOK (0). If the outstanding asynchronous function was not cancelled, one of the following codes will be returned.

 

WHLLINVALID

 

hAsyncTask is not a valid task handle.

 

WHLLALREADY

 

The asynchronous task specified by hAsyncTask has already completed.