4.2 WFSCancelBlockingCall

HRESULT WFSCancelBlockingCall( dwThreadID )

Cancels a blocking operation for the specified thread, if one is in progress.

Parameters DWORD dwThreadID

Identifies the thread for which the blocking operation is to be canceled; a NULL value indicates the calling thread.

Mode Immediate

Comments This function is used to cancel a blocking call (synchronous request) that is in progress. Since a thread may have only one blocking call in progress at any time, WFSIsBlocking and WFSCancelBlockingCall are the only WOSA/XFS functions allowed with respect to a thread when it has a blocking call in progress.

The application that issued the blocking call receives a WFS_ERR_CANCELED return code if the operation is successfully canceled.

The cancellation applies not only to the XFS Manager level, but also to the service provider level. The request is passed through the SPI, and the service provider normally then also cancels any physical I/O or other device operation in progress, in the appropriate manner for the device or service.

Note: the cancel request is accepted and is honored as soon as all Windows messages have been removed from the message queue (i.e. GetMessage returns no more messages). Refer to WFSSetBlockingHook for more information.

Error Codes If the function return is not WFS_SUCCESS, it is the following error condition:

WFS_ERR_CONNECTION_LOST
The connection to the service is lost.
WFS_ERR_INTERNAL_ERROR
An internal inconsistency or other unexpected error occurred in the WOSA/XFS subsystem.
WFS_ERR_NO_BLOCKING_CALL
There is no outstanding blocking call for the specified thread.
WFS_ERR_NO_SUCH_THREAD
The specified thread does not exist.
WFS_ERR_NOT_STARTED
The application has not previously performed a successful WFSStartUp.

See also WFSSetBlockingHook, WFSIsBlocking, WFSCancelAsyncRequest