<div class="content"><p>RpcAddPrinterDriver installs a <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_1a48eebd-e72c-494d-b8cb-84dfb7bc3b65" data-linktype="relative-path">printer driver</a> on the <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_59fb3ddc-63cf-45df-8a90-46a6af9e00cb" data-linktype="relative-path">print server</a> and links the
configuration, data, and printer driver files.</p><dl>
<dd>
<div><pre> DWORD RpcAddPrinterDriver(
   [in, string, unique] STRING_HANDLE pName,
   [in] DRIVER_CONTAINER* pDriverContainer
 );
</pre></div>
</dd></dl><p><b>pName: </b>Specified 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>pDriverContainer: </b>Specified in <a href="353ff796-6fb3-41cf-8b35-0022dd53d886" data-linktype="relative-path">DRIVER_CONTAINER
Parameters (section 3.1.4.1.8.3)</a>. The <b>Level</b> member of the <a href="3a3f9cf7-8ec4-4921-b1f6-86cf8d139bc2" data-linktype="relative-path">DRIVER_CONTAINER</a> MUST be
0x00000002, 0x00000003, or 0x00000004.</p><p><b>Return Values: </b>This method MUST return zero
(ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error
code to indicate failure <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.</p><p>Upon receiving this message, the server MUST perform the
validation steps specified in:</p><ul><li><p><span><span> 
</span></span>Print Server Name Parameters (section 3.1.4.1.4).</p>
</li><li><p><span><span> 
</span></span>DRIVER_CONTAINER Parameters.</p>
</li></ul><p>Additional validation MAY<a id="Appendix_A_Target_324"></a><a aria-label="Product behavior note 324" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_324" data-linktype="relative-path">&lt;324&gt;</a> be
performed.</p><p>In addition, print servers SHOULD<a id="Appendix_A_Target_325"></a><a aria-label="Product behavior note 325" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_325" data-linktype="relative-path">&lt;325&gt;</a> validate parameters as
follows:</p><ul><li><p><span><span> 
</span></span>Validate that the <b>cVersion</b> member of the <b>DRIVER_INFO</b>
structure contained in the DRIVER_CONTAINER pointed to by the <i>pDriverContainer</i>
is strictly less than 0x00000004. If this validation fails, return
ERROR_PRINTER_DRIVER_BLOCKED.</p>
</li><li><p><span><span> 
</span></span>Validate that the <b>pEnvironment</b> member of the <b>DRIVER_INFO</b>
structure contained in the DRIVER_CONTAINER pointed to by the <i>pDriverContainer</i>
parameter is not &#34;Windows ARM&#34;. If this validation fails, return
ERROR_NOT_SUPPORTED.</p>
</li></ul><p>If the installation requested by the print client is a
printer driver upgrade, print servers SHOULD perform the following additional
validation steps:</p><ul><li><p><span><span> 
</span></span>Validate that the currently installed printer driver is not a
class printer driver.</p>
</li><li><p><span><span> 
</span></span>Validate that if the currently installed printer driver has a
driver version of 0x00000004, the currently installed printer driver does not
have a newer driver date, or if the driver dates are the same, that the
currently installed printer driver does not have a newer manufacturer-provided
driver version number.</p>
</li><li><p><span><span> 
</span></span>Validate that if the currently installed printer driver has a
driver version of 0x00000004, there are no printers on the print server that
are shared and also use the currently installed printer driver.</p>
</li></ul><p>If this validation fails, the print server MUST return
ERROR_PRINTER_DRIVER_BLOCKED.</p><p>If parameter validation fails, the server MUST fail the
operation immediately and return a nonzero error response to the client.
Otherwise, the server MUST process the message and compose a response to the
client as follows:</p><ul><li><p><span><span> 
</span></span>Copy the printer driver files to their destination. If the copy
operation fails, the server MUST fail the call immediately and return a nonzero
error response to the client.</p>
</li><li><p><span><span> 
</span></span>Create the printer driver object, using an
implementation-specific mechanism to determine the Boolean values of each of
the attributes of the printer driver object.<a id="Appendix_A_Target_326"></a><a aria-label="Product behavior note 326" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_326" data-linktype="relative-path">&lt;326&gt;</a></p>
</li><li><p><span><span> 
</span></span>If any clients have registered for notification of server object
changes, a notification MUST be broadcast to them.</p>
</li><li><p><span><span> 
</span></span>Return the status of the operation.</p>
</li></ul></div>