5.5 WFPGetInfo

HRESULT WFPGetInfo( hService, dwCategory, lpQueryDetails, dwTimeOut, hWnd, ReqID )

Retrieves various kinds of information from the specified service provider.

Parameters HSERVICE hService

Handle to the service provider.

DWORD dwCategory

Specifies the category of the query (e.g., for a printer, WFS_INF_PTR_STATUS to request status or WFS_INF_PTR_CAPABILITIES to request capabilities). The available categories depend on the service class, the service provider and the service. The information requested can be either static or dynamic, e.g., basic service capabilities (static) or current service status (dynamic).

LPVOID lpQueryDetails

Pointer to the data structure to be passed to the service provider, containing further details to make the query more precise, e.g., a form name. (Many queries have no input parameters, in which case this pointer is NULL.)

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 The XFS Manager retrieves the information requested from the service provider itself, and, since the information can be stored remotely, the function cannot be guaranteed to complete immediately. Note that, typically, requests for generic and class specific categories can complete immediately. See WFSGetInfo for additional discussion.

The specifications for the information structures for each service class can be found in the specifications for the service-specific commmands.

Messages WFS_GETINFO_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_CATEGORY
The dwCategory issued is not supported by this service class.
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_POINTER
A pointer parameter does not point to accessible memory.
WFS_ERR_UNSUPP_CATEGORY
The dwCategory issued, although valid for this service class, is not supported by this service provider.

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_INVALID_DATA
The data structure passed as input parameter contains invalid data..
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.