4.4 WFSClose

HRESULT WFSClose( hService )

Terminates a session (a series of service requests initiated with the WFSOpen or WFSAsyncOpen function) between the application and the specified service. The synchronous version of WFSAsyncClose.

Parameters HSERVICE hService

The service handle returned by WFSOpen or WFSAsyncOpen. Matches the close request to the open request, allowing an application to have multiple sessions open simultaneously with a single service provider.

Mode Synchronous

Comments WFSClose directs the service to free all resources associated with the series of requests made using the hService parameter since the WFSOpen that returned it. If there is a blocking call in progress the close fails. If the service is locked, the close automatically unlocks it. If no WFSDeregister has been issued, it is automatically performed.

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions. 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 WFSCancelBlockingCall.
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_NOT_STARTED
The application has not previously performed a successful WFSStartUp.
WFS_ERR_OP_IN_PROGRESS
A blocking operation is in progress on the thread; only WFSCancelBlockingCall and WFSIsBlocking are permitted at this time.

See also WFSAsyncClose, WFSOpen, WFSDeregister