3.1.4.2.10 RpcAsyncCorePrinterDriverInstalled (Opnum 65)

RpcAsyncCorePrinterDriverInstalled determines if a specific core printer driver is installed.

 HRESULT RpcAsyncCorePrinterDriverInstalled(
   [in] handle_t hRemoteBinding,
   [in, string, unique] const wchar_t* pszServer,
   [in, string] const wchar_t* pszEnvironment,
   [in] GUID CoreDriverGUID,
   [in] FILETIME ftDriverDate,
   [in] DWORDLONG dwlDriverVersion,
   [out] int* pbDriverInstalled
 );

hRemoteBinding: An RPC explicit binding handle.

pszServer: A pointer to a string that contains the name of the print server to check and determine if a core printer driver is installed. This server name MUST be identical to the server name that was used to create the hRemoteBinding parameter. For details on RPC bind handles, see [MS-RPCE]. For rules governing print server names, see [MS-RPRN] section 2.2.4.16.

pszEnvironment: A pointer to a string that contains the environment name of the core printer driver. For rules governing environment names and behaviors, see [MS-RPRN] section 2.2.4.4.

CoreDriverGUID: The GUID of the core printer driver.

ftDriverDate: The date of the core printer driver.<23>

dwlDriverVersion: The version<24> of the core printer driver.

pbDriverInstalled: A pointer to a variable that receives one of the following values.

Value

Meaning

0

The driver, or a newer version of the driver, is not installed.

1

The driver, or a newer version of the driver, is installed.

Return Values: This method returns either an HRESULT success value ([MS-ERREF] section 2.1) or an HRESULT error value to indicate failure.

Exceptions Thrown: This method MUST NOT throw any exceptions other than those that are thrown by the underlying RPC protocol [MS-RPCE].

Parameter Validation Requirements: Upon receiving this method call, the server MUST validate parameters as follows:

  • The string pointed to by the pszEnvironment parameter specifies one of the supported environment names on the server for that type of driver; otherwise the server MUST return ERROR_INVALID_ENVIRONMENT.

  • The pbDriverInstalled parameter MUST NOT be NULL; otherwise the server MUST return ERROR_INVALID_PARAMETER.

If parameter validation fails, the server MUST fail the operation immediately, and return a nonzero error response to the client.

Processing and Response Requirements: If parameter validation succeeds, the server MUST process the method call by:

  • Searching for the core printer driver with the specified CoreDriverGUID, ftDriverDate, and dwlDriverVersion in the list of installed core printer drivers on the print server.

  • Setting the value of the variable pointed to by pbDriverInstalled to 1 if the search succeeded or to zero if not.

  • Returning a response that contains the output parameters mentioned above and the status of the operation.

The server MUST NOT change the List of Core Printer Drivers as part of processing this method call.