4.7 WFSDeregister

HRESULT WFSDeregister( hService, dwEventClass, hWndReg )

Discontinues monitoring of the specified message class(es) (or all classes) from the specified hService, by the specified hWndReg (or all the calling application's hWnd's). The synchronous version of WFSAsyncDeregister.

Parameters HSERVICE hService

Service handle returned by WFSOpen or WFSAsyncOpen. If this value is NULL, and dwEventClass is SYSTEM_EVENTS, the XFS manager deregisters the application for those system events generated by the Manager itself.

DWORD dwEventClass

The class(es) of messages from which the application is deregistering. Specified as a bit mask that can be a logical OR of the values for multiple classes. A NULL value requests that all message classes be deregistered from the specified window for this hService.

HWND hWndReg

The window which has been previously registered to receive notification messages, and is now to be deregistered. A NULL value requests that all the application's windows be deregistered from the specified message class(es) for this hService.

Mode Synchronous

Comments The functions of a WFSDeregister request are performed automatically if a WFSClose is issued without a previous WFSDeregister.

See section 3.11 for a description of the classes of events that may be monitored.

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions:

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_EVENT_CLASS
The dwEventClass parameter specifies one or more event classes not supported by the service.
WFS_ERR_INVALID_HSERVICE
The hService parameter is not a valid service handle.
WFS_ERR_INVALID_HWNDREG
The hWndReg parameter is not a valid window handle.
WFS_ERR_NOT_REGISTERED
The specified hWndReg window was not registered to receive messages for any event classes.
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 WFSRegister, WFSClose