5.2 WFPClose

HRESULT WFPClose( hService, hWnd, ReqID )

Terminates a session (a series of service requests initiated with the WFPOpen SPI function) between the XFS Manager and the specified service provider.

Parameters HSERVICE hService

Handle to the service provider.

HWND hWnd

The window handle which is to receive the completion message for this request.

REQUESTID ReqID

Request identification number.

Mode Asynchronous

Comments WFPClose directs the service to free all resources associated with the series of requests made using the hService parameter. If the service is locked by the application, the close automatically unlocks it. If no WFPDeregister has been issued, it is automatically performed.

See WFPOpen and Section 3.6 for further discussion.

Messages WFS_CLOSE_COMPLETE

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions, indicating that the asynchronous operation was not initiated. The service-specific errors that can be returned are defined in the specifications for each service class.

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_INVALID_HSERVICE
The hService parameter is not a valid service handle.
WFS_ERR_INVALID_HWND
The hWnd parameter is not a valid window handle.

The following error conditions are returned via the asynchronous command completion message, as the hResult from the WFSRESULT structure. Any service-specific errors that can be returned are defined in the specifications for each service class.

WFS_ERR_CANCELED
The request was canceled by WFSCancelAsyncRequest.
WFS_ERR_INTERNAL_ERROR
An internal inconsistency or other unexpected error occurred in the WOSA/XFS subsystem.