RpcAsyncGetPrinterDriverPackagePath gets the path to the specified printer driver package.

The counterpart of this method in the Print System Remote Protocol is RpcGetPrinterDriverPackagePath, [MS-RPRN] section 3.1.4.4.10.

 HRESULT RpcAsyncGetPrinterDriverPackagePath(
   [in] handle_t hRemoteBinding,
   [in, string, unique] const wchar_t* pszServer,
   [in, string] const wchar_t* pszEnvironment,
   [in, string, unique] const wchar_t* pszLanguage,
   [in, string] const wchar_t* pszPackageID,
   [in, out, unique, size_is(cchDriverPackageCab)] 
     wchar_t* pszDriverPackageCab,
   [in] DWORD cchDriverPackageCab,
   [out] DWORD* pcchRequiredSize
 );

hRemoteBinding: An RPC explicit binding handle.

pszServer: A pointer to a string that contains the name of the print server from which to get the printer driver package path. 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 for which the driver package path is returned. For rules governing environment names and behaviors, see [MS-RPRN] section 2.2.4.4.

pszLanguage: A pointer to a string that contains the language for which the driver package path is returned.<25> Providing this pointer is optional. If the pointer is not provided, the value of this parameter MUST be NULL.

pszPackageID: A pointer to a string that contains package name. The package name is obtained by calling RpcAsyncGetCorePrinterDrivers.

pszDriverPackageCab: A pointer to a string that contains the path name of the driver package file.<26> For rules governing path names, see [MS-RPRN] section 2.2.4.9. The pszDriverPackageCab parameter MUST NOT be NULL unless cchDriverPackageCab is zero.

cchDriverPackageCab: The size, in characters, of the buffer that is referenced by the pszDriverPackageCab parameter. The value of this parameter MAY<27> be zero.

pcchRequiredSize: A pointer to a variable that receives the required size of the buffer that is pointed to by the pszDriverPackageCab parameter.

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:

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:

The server MUST NOT change the list of driver package cabs as part of processing this method call.