3.1.4.1.63 FAX_GetServicePrinters (Opnum 0)

The fax client application calls the FAX_GetServicePrinters (Opnum 0) method to obtain a list of printers that are visible to the fax server.

In response, the server MUST validate whether the client's fax user account has access to execute this operation. On success, the server SHOULD enumerate printers using an implementation-specific method<135> and then the server MUST return information about all the enumerated printers in a buffer containing an array of FAX_PRINTER_INFOW (section 2.2.43) structures, each of the returned structures describing one enumerated printer. The server MUST also return the size of this information and the number of printers for which it enumerated the information successfully.

The client SHOULD free the returned buffer.

 error_status_t FAX_GetServicePrinters(
   [in] handle_t hBinding,
   [out, size_is(,*lpdwBufferSize)] 
     LPBYTE* lpBuffer,
   [out, ref] LPDWORD lpdwBufferSize,
   [out, ref] LPDWORD lpdwPrintersReturned
 );

hBinding: The RPC binding handle for this call. The client SHOULD reuse the RPC binding handle used as an input hBinding argument for the FAX_ConnectFaxServer (section 3.1.4.1.10) or FAX_ConnectionRefCount (section 3.1.4.1.11) method call used to connect to the fax server.

lpBuffer: A pointer to a buffer containing an array of FAX_PRINTER_INFOW.

lpdwBufferSize: A pointer to a DWORD ([MS-DTYP] section 2.2.9) value containing the size, in bytes, of the buffer.

lpdwPrintersReturned: A pointer to a DWORD value indicating the number of the printers in the buffer.

Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the following error codes, one of the fax-specific errors that are defined in section 2.2.52, or one of the other standard errors defined in [MS-ERREF] section 2.2.

Return value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The client's fax user account does not have the FAX_ACCESS_QUERY_CONFIG access rights required for this operation.

ERROR_NOT_ENOUGH_MEMORY

0x00000008

Not enough storage is available to process this command. The fax server failed to allocate sufficient memory to hold the array of FAX_PRINTER_INFOW structures to be returned to the client.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. The lpBuffer parameter is set to a NULL pointer value.<136>

ERROR_INTERNAL_ERROR

0x0000054F

The fax server failed to custom marshal the array of FAX_PRINTER_INFOW structures to be returned to the client.

Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol, [MS-RPCE].