5.8 WFPRegister

HRESULT WFPRegister( hService, dwEventClass, hWndReg, hWnd, ReqID )

Enables event monitoring for the specified service by the specified hWndReg; all events of the specified class(es) generate messages to the hWndReg.

Parameters HSERVICE hService

Handle to the service provider.

DWORD dwEventClass

The class(es) of events for which the application is registering. Specified as a set of bit masks that can be logically ORed together.

HWND hWndReg

The window handle which is to be registered to receive the specified messages.

HWND hWnd

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

REQUESTID ReqID

Request identification number.

Mode Asynchronous

Comments WFPDeregister is used to cancel notifications. See WFSRegister.

Messages WFS_REGISTER_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. Any 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_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_HWND
The hWnd parameter is not a valid window handle.
WFS_ERR_INVALID_HWNDREG
The hWndReg 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.