<div class="content"><p> </p><p><b>RpcAsyncUploadPrinterDriverPackage</b> uploads a <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_1874576f-4b40-4a78-a1f3-9e47b7ce21c9" data-linktype="relative-path">driver
package</a></span> so it can be installed with <b>RpcAsyncInstallPrinterDriverFromPackage</b>
(section <span><a href="8c7c8847-8400-4a28-847f-b8a898b422d1" data-linktype="relative-path">3.1.4.2.7</a></span>).</p><dl>
<dd>
<div><pre> HRESULT RpcAsyncUploadPrinterDriverPackage(
   [in] handle_t hRemoteBinding,
   [in, string, unique] const wchar_t* pszServer,
   [in, string] const wchar_t* pszInfPath,
   [in, string] const wchar_t* pszEnvironment,
   [in] DWORD dwFlags,
   [in, out, unique, size_is(*pcchDestInfPath)] 
     wchar_t* pszDestInfPath,
   [in, out] DWORD* pcchDestInfPath
 );
</pre></div>
</dd></dl><p><b>hRemoteBinding: </b>An <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> explicit binding
handle.</p><p><b>pszServer: </b>A pointer to a string that
specifies the name of the <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_59fb3ddc-63cf-45df-8a90-46a6af9e00cb" data-linktype="relative-path">print server</a></span> to
which this method will upload the <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_1a48eebd-e72c-494d-b8cb-84dfb7bc3b65" data-linktype="relative-path">printer driver</a></span> <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_4f0cc3a7-3067-4da4-a126-52f03256d162" data-linktype="relative-path">package</a></span>.</p><dl>
<dd>
<p>This string contains the server name that was used
to create the <i>hRemoteBinding</i> parameter. For RPC bind handles, refer to <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.
For rules governing server names, refer to <span><a href="../ms-rprn/d42db7d5-f141-4466-8f47-0a4be14e2fc1" data-linktype="relative-path">[MS-RPRN]</a></span>
section <span><a href="../ms-rprn/9b3f8135-7022-4b72-accb-aefcc360c83b" data-linktype="relative-path">2.2.4.16</a></span>.</p>
</dd></dl><p><b>pszInfPath: </b>A pointer to a string that
specifies the path to a driver installation control file that specifies the
printer driver.</p><dl>
<dd>
<p>This control file MAY be used to install the driver
on a target system.<a id="Appendix_A_Target_19"></a><a aria-label="Product behavior note 19" href="d3e1685c-9f7c-4e09-9538-e81034bac916#Appendix_A_19" data-linktype="relative-path">&lt;19&gt;</a> For rules governing path names,
see [MS-RPRN] section <span><a href="../ms-rprn/1d75f622-d07c-45cc-bf1e-a6191e408516" data-linktype="relative-path">2.2.4.9</a></span>.</p>
</dd>
<dd>
<p>The path specified by <i>pszInfPath</i> MUST be
accessible by the server.<a id="Appendix_A_Target_20"></a><a aria-label="Product behavior note 20" href="d3e1685c-9f7c-4e09-9538-e81034bac916#Appendix_A_20" data-linktype="relative-path">&lt;20&gt;</a></p>
</dd></dl><p><b>pszEnvironment: </b>A pointer to a string that
specifies the environment name for which the driver package is uploaded. For
rules governing environment names, see [MS-RPRN] section <span><a href="../ms-rprn/ad775893-8a19-4786-ab46-34731f52d1af" data-linktype="relative-path">2.2.4.4</a></span>.</p><p><b>dwFlags: </b>A bitfield that specifies the options
for uploading a driver package.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  </td>
  <td>
  <p>This method uploads the driver package that is named
  by the string pointed to by the <i>pszInfPath</i> parameter to the print
  server, but only if that driver package is not already present on the server.</p>
  </td>
 </tr><tr>
  <td>
  <p>UPDP_UPLOAD_ALWAYS</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>This method uploads the driver package files specified
  by the <i>pszInfPath</i> parameter even if the driver package is already
  present on the print server.</p>
  </td>
 </tr><tr>
  <td>
  <p>UPDP_CHECK_DRIVERSTORE</p>
  <p>0x00000004</p>
  </td>
  <td>
  <p>This method only checks the print server&#39;s <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_55d56bf9-1542-43e4-b603-2e08ad5cdd3f" data-linktype="relative-path">driver
  store</a></span> to see if the driver package specified by the <i>pszInfPath</i>
  parameter is already present on the print server. If the driver package is
  not present on the print server, this method returns ERROR_NOT_FOUND;
  otherwise, the method returns zero.</p>
  <p>This flag is ignored if the UPDP_UPLOAD_ALWAYS flag is
  set.</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>All other bits are set to zero by
the client and ignored by the server upon receipt.</p>
</dd></dl><p><b>pszDestInfPath: </b>A pointer to a buffer that
receives a string that specifies the full path of the directory to which the
driver installation control file was copied. For rules governing path names,
see [MS-RPRN] section 2.2.4.9.</p><dl>
<dd>
<p>The value of the string is ignored by the server
upon input.</p>
</dd></dl><p><b>pcchDestInfPath: </b>On input, this parameter is a
pointer to a variable that specifies the size, in characters, of the buffer
that is referenced by the <i>pszDestInfPath</i> parameter. The specified size
is at least 260 characters.</p><dl>
<dd>
<p>On output, the variable to which this parameter
points receives the size, in characters, of the path string. The path string
includes the terminating null character that was written into the buffer
referenced by the <i>pszDestInfPath</i> parameter.</p>
</dd></dl><p><b>Return Values: </b>This method returns either an <span><a href="a98de8d9-8e9e-4cd7-92f7-f9269206a41e#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a></span>
success value (<span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a></span>)
or an HRESULT 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
[MS-RPCE].</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>pszInfPath</i> parameter contains
a valid path name; otherwise the server MUST return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>The string pointed to by the <i>pszEnvironment</i> parameter
specifies one of the supported environment names on this server for that type
of driver; otherwise the server MUST return ERROR_INVALID_ENVIRONMENT.</p>
</li><li><p><span><span> 
</span></span>The size specified by the variable pointed to by <i>pcchDestInfPath</i>
is at least 260 characters; otherwise the server MUST return
ERROR_INVALID_PARAMETER.</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 as follows:</p><ul><li><p><span><span> 
</span></span>If the <i>dwFlags</i> parameter is 0x00000000 and the driver
package does not exist already in the server&#39;s driver store, upload the signed
driver package to the driver store of the print server so that it can be
installed with <b>RpcAsyncInstallPrinterDriverFromPackage</b>.</p>
</li><li><p><span><span> 
</span></span>If the <i>dwFlags</i> parameter is 0x00000002, upload the signed
driver package to the driver store of the print server, even if it already
exists in the server&#39;s driver store, so that it can be installed with <b>RpcAsyncInstallPrinterDriverFromPackage</b>.</p>
</li><li><p><span><span> 
</span></span>Return the driver store path name of the file that describes the
printer driver in the buffer pointed to by the output parameter <i>pszDestInfPath</i>.<a id="Appendix_A_Target_21"></a><a aria-label="Product behavior note 21" href="d3e1685c-9f7c-4e09-9538-e81034bac916#Appendix_A_21" data-linktype="relative-path">&lt;21&gt;</a></p>
</li><li><p><span><span> 
</span></span>Set the contents of the output parameter <i>pcchDestInfPath</i>
to the size of the data in the buffer. </p>
</li><li><p><span><span> 
</span></span>If the <i>dwFlags</i> parameter is 0x00000004, check whether the
driver package already exists in the server&#39;s driver store. If the driver
package exists, return zero; otherwise, return ERROR_FILE_NOT_FOUND.</p>
</li><li><p><span><span> 
</span></span>Return a response that contains the specified output parameters
and the status of the operation.</p>
</li></ul><p>If the operation is successful, the server MUST upload the
driver package into the system driver store before returning the response.</p></div>