5.6 WFPLock

HRESULT WFPLock( hService, dwTimeOut, hWnd, ReqID )

Establishes exclusive control by the calling application over the specified service.

Parameters HSERVICE hService

Handle to the service provider.

DWORD dwTimeOut

Number of milliseconds to wait for completion (WFS_INDEFINITE_WAIT to specify a request that will wait until completion).

HWND hWnd

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

REQUESTID ReqID

Request identification number.

Mode Asynchronous

Comments See WFSLock.

Messages WFS_LOCK_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_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_DEV_NOT_READY
The function required device access, and the device was not ready or timed out.
WFS_ERR_HARDWARE_ERROR
The function required device access, and an error occured on the device.
WFS_ERR_INTERNAL_ERROR
An internal inconsistency or other unexpected error occurred in the WOSA/XFS subsystem.
WFS_ERR_SOFTWARE_ERROR
The function required access to configuration information, and an error occured on the software.
WFS_ERR_TIMEOUT
The timeout interval expired.