HRESULT WFSAsyncLock( hService, dwTimeOut, hWnd, lpRequestID )
Establishes exclusive control by the calling application over the specified service. The asynchronous version of WFSLock.
Parameters HSERVICE hService
Handle to the service provider as returned by WFSOpen or WFSAsyncOpen.
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.
LPREQUESTID lpRequestID
Pointer to the request identifier for this request (returned parameter).
Mode Asynchronous
Comments See WFSLock and Section 3.8.2. In particular, note that if other services are locked as a result of this call (i.e., because the service specified is part of a compound device), the handles of these services are returned in the WFSRESULT data structure pointed to by the completion message.
The application must call WFSFreeResult to deallocate the WFSRESULT data structure. Note that a WFSRESULT structure may be returned even if the function completes with an error; see Section 3.13.
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:
The following error conditions are returned via the asynchronous command completion message, as the hResult from the WFSRESULT structure.
See also WFSLock, WFSUnlock, WFSCancelAsyncRequest