WinNOFCancelAsyncRequest()

This function cancels an outstanding WinAsyncNOF based request.

Syntax

int WINAPI WinNOFCancelAsyncRequest(HANDLE handle);
Parameters
handle
Supplied parameter; specifies the handle of the request to be canceled.

Returns

The return value specifies whether the asynchronous request was canceled. If the value is zero, the request was canceled. Otherwise the value is:
WNOFALREADY
An error code indicating that the asynchronous request being canceled has already completed, or the handle was not valid.

Remarks

An asynchronous request previously issued by one of the WinAsyncNOF functions can be canceled prior to completion by issuing the WinNOFCancelAsyncRequest() call, specifying the handle returned by the initial function in handle.

Canceling an asynchronous request stops any update to the application verb control block and stops the application being notified that the verb has completed (either by way of the window message or event). It does not cancel the underlying request. To actually cancel the underlying request, the application must issue the appropriate NOF verb (that is, STOP_LS to cancel START_LS).

Should an attempt to cancel an existing asynchronous WinAsyncNOF routine fail with an error code of WNOFALREADY, one of two things has occurred. Either the original routine has already completed and the application has dealt with the resulting notification, or the original routine has already completed but the application has not dealt with the completion notification.

Note: See also WinAsyncNOF() on page WinAsyncNOF().