<div class="content"><p>RpcGetPrinterDriverPackagePath gets the path to the
specified printer driver package.<a id="Appendix_A_Target_349"></a><a aria-label="Product behavior note 349" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_349" data-linktype="relative-path">&lt;349&gt;</a></p><dl>
<dd>
<div><pre> HRESULT RpcGetPrinterDriverPackagePath(
   [in, string, unique] STRING_HANDLE 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] LPDWORD pcchRequiredSize
 );
</pre></div>
</dd></dl><p><b>pszServer: </b>A <a href="59883eb8-5ce6-4ad4-bdd2-599434cfdcf2" data-linktype="relative-path">STRING_HANDLE (section 2.2.1.1.7)</a>
for a server object. This parameter MUST adhere to the specification in <a href="acb355a4-913b-4abb-8cb5-415aea160015" data-linktype="relative-path">Print Server Name
Parameters (section 3.1.4.1.4)</a>.</p><p><b>pszEnvironment: </b>A pointer to a string that
specifies the environment name for which the <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_1874576f-4b40-4a78-a1f3-9e47b7ce21c9" data-linktype="relative-path">driver package</a> path MUST be
returned. For rules governing environment names, see section <a href="ad775893-8a19-4786-ab46-34731f52d1af" data-linktype="relative-path">2.2.4.4</a>.</p><p><b>pszLanguage: </b>An optional pointer to a string
that specifies the language for which the driver package path MUST<a id="Appendix_A_Target_350"></a><a aria-label="Product behavior note 350" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_350" data-linktype="relative-path">&lt;350&gt;</a> be returned.</p><p><b>pszPackageID: </b>A pointer to a string that
specifies the package name. The package name MUST be obtained by calling
RpcGetCorePrinterDrivers.</p><p><b>pszDriverPackageCab: </b>This parameter is a
pointer to a buffer that receives a string that specifies the path name of the
driver package file.<a id="Appendix_A_Target_351"></a><a aria-label="Product behavior note 351" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_351" data-linktype="relative-path">&lt;351&gt;</a> For
rules governing path names, see section <a href="1d75f622-d07c-45cc-bf1e-a6191e408516" data-linktype="relative-path">2.2.4.9</a>. <i>pszDriverPackageCab</i>
MUST NOT be NULL unless <i>cchDriverPackageCab</i> is zero.</p><p><b>cchDriverPackageCab: </b>This parameter specifies
the size, in characters, of the buffer that is referenced by the <i>pszDriverPackageCab</i>
parameter. The value of this parameter MAY<a id="Appendix_A_Target_352"></a><a aria-label="Product behavior note 352" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_352" data-linktype="relative-path">&lt;352&gt;</a> be
zero.</p><p><b>pcchRequiredSize: </b>A pointer to a variable that
MUST receive the required size of the buffer that is pointed to by the <i>pszDriverPackageCab</i>
parameter.</p><p><b>Return Values: </b>This method MUST return zero or
an <b>HRESULT</b> success value (<a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a>)
to indicate successful completion or an <b>HRESULT</b> error value to indicate
failure.</p><p><b>Exceptions Thrown:</b> This method MUST NOT throw any
exceptions other than those that are thrown by the underlying RPC protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p><p><b>Parameter Validation Requirements:</b> Upon receiving
this method call, the server MUST validate parameters as follows:</p><ul><li><p><span><span> 
</span></span>The string pointed to by the <i>pszEnvironment</i> parameter
specifies one of the supported environment names on the server for that type of
driver; otherwise the server MUST return ERROR_INVALID_ENVIRONMENT.</p>
</li><li><p><span><span> 
</span></span>The value of the <i>pszPackageID</i> parameter MUST NOT be NULL;
otherwise the server MUST return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>The value of the <i>pcchRequiredSize</i> parameter MUST NOT be
NULL; otherwise the server MUST return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>The size specified by <i>cchDriverPackageCab</i> MUST be
sufficient to hold the path name of the driver package file; otherwise the
server MUST calculate the required number of characters and write this number
to the variable pointed to by the <i>pcchRequiredSize</i> output parameter, and
return ERROR_INSUFFICIENT_BUFFER.</p>
</li></ul><p>If parameter validation fails, the server MUST fail the
operation immediately and return a nonzero error response to the client.</p><p><b>Processing and Response Requirements:</b> If parameter
validation succeeds, the server MUST process the method call by:</p><ul><li><p><span><span> 
</span></span>Searching for the driver package cab file for the specified <i>pszPackageID</i>.</p>
</li><li><p><span><span> 
</span></span>Returning the driver package cab path for package ID in the
output parameter pszDriverPackageCab.</p>
</li><li><p><span><span> 
</span></span>Setting the contents of the parameter <i>pcchRequiredSize</i> to
the size of the string buffer required to hold the driver package cab.</p>
</li><li><p><span><span> 
</span></span>Returning a response that MUST contain the output parameters
mentioned above and the status of the operation.</p>
</li></ul><p>The server MUST NOT change the list of driver package cabs
as part of processing this method call.</p></div>