<div class="content"><p>RpcRemoteFindFirstPrinterChangeNotification creates a remote
change notification object that monitors changes to printer objects and sends
change notifications to a <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_3b2da3d1-c159-4399-a6dd-dfd5f76fa2f5" data-linktype="relative-path">print
client</a> using either <a href="38bf5d2c-e4a7-44b2-b16f-91ff8226f836" data-linktype="relative-path">RpcRouterReplyPrinter (section 3.2.4.1.2)</a>
or <a href="1b44cb82-95b5-485c-9ec9-0360c3a3ecb0" data-linktype="relative-path">RpcRouterReplyPrinterEx (section 3.2.4.1.4)</a>.</p><dl>
<dd>
<div><pre> DWORD RpcRemoteFindFirstPrinterChangeNotification(
   [in] PRINTER_HANDLE hPrinter,
   [in] DWORD fdwFlags,
   [in] DWORD fdwOptions,
   [in, string, unique] wchar_t* pszLocalMachine,
   [in] DWORD dwPrinterLocal,
   [in, range(0,512)] DWORD cbBuffer,
   [in, out, unique, size_is(cbBuffer), disable_consistency_check] 
     BYTE* pBuffer
 );
</pre></div>
</dd></dl><p><b>hPrinter: </b>A handle to a printer or server
object that was opened by <a href="bd0bb8d5-26fd-4705-81f5-614d32b9f38f" data-linktype="relative-path">RpcAddPrinter (section 3.1.4.2.3)</a>,
<a href="3af45717-308f-4b4f-8428-430d12856110" data-linktype="relative-path">RpcAddPrinterEx (section 3.1.4.2.15)</a>,
<a href="989357e2-446e-4872-bb38-1dce21e1313f" data-linktype="relative-path">RpcOpenPrinter (section 3.1.4.2.2)</a>,
or <a href="0e81ce18-72b1-46c3-8584-a205393b04ff" data-linktype="relative-path">RpcOpenPrinterEx (section 3.1.4.2.14)</a>.</p><p><b>fdwFlags: </b>Flags that specify the conditions
that are required for a change notification object to enter a signaled state. A
change notification MUST occur when one or more of the specified conditions are
met.</p><dl>
<dd>
<p>This parameter specifies a bitwise OR of zero or
more <a href="f7e72f6c-8ba3-4573-8a7e-dd12f2cff50e" data-linktype="relative-path">Printer Change
Values (section 2.2.4.13)</a>. The rules governing printer change
values are specified in section 2.2.4.13.</p>
</dd></dl><p><b>fdwOptions: </b>The category of printers for which
change notifications are returned. This parameter MUST be one of the supported
values specified in Printer Notification Values (section <a href="41d5c622-ec77-49ff-95e3-69b325ce4e77" data-linktype="relative-path">2.2.3.8</a>).</p><p><b>pszLocalMachine: </b>A pointer to a string that
represents the name of the client computer. The rules governing server names
are specified in section <a href="9b3f8135-7022-4b72-accb-aefcc360c83b" data-linktype="relative-path">2.2.4.16</a>.</p><p><b>dwPrinterLocal: </b>An implementation-specific
unique value that MUST be sufficient for the client to determine whether a call
to <a href="7fcd3036-d45a-4ec7-b081-f2b860e66676" data-linktype="relative-path">RpcReplyOpenPrinter (section 3.2.4.1.1)</a>
by the server is associated with the <i>hPrinter</i> parameter in this call.<a id="Appendix_A_Target_381"></a><a aria-label="Product behavior note 381" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_381" data-linktype="relative-path">&lt;381&gt;</a></p><p><b>cbBuffer: </b>A value that SHOULD be set to zero
when sent and MUST be ignored on receipt.</p><p><b>pBuffer: </b>A pointer that MUST be set to NULL
when sent and MUST be ignored on receipt.</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 <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_59fb3ddc-63cf-45df-8a90-46a6af9e00cb" data-linktype="relative-path">print server</a> MUST validate
parameters as follows:</p><ul><li><p><span><span> 
</span></span>Perform the validation steps specified in <a href="10bfa8c2-d456-4ad0-912d-e674766a36c8" data-linktype="relative-path">PRINTER_HANDLE
Parameters (section 3.1.4.1.11)</a>. This method SHOULD assume that
the handle to the printer or server object can be used without further access
checks.</p>
</li><li><p><span><span> 
</span></span>Verify that a notification object is not already associated with
the current handle.</p>
</li></ul><p>If parameter validation fails, the server MUST fail the
operation immediately returning 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>Create and initialize a notification object that captures the
notification settings requested by the user.</p>
</li><li><p><span><span> 
</span></span>Create and initialize a notification channel back to the client,
over which the server can communicate the change notifications. This MUST be
done by calling RpcReplyOpenPrinter on the client specified by the name pointed
to by <i>pszLocalMachine</i>.</p>
</li><li><p><span><span> 
</span></span>Associate the notification object with the context for <i>hPrinter</i>.</p>
</li><li><p><span><span> 
</span></span>After the preceding steps have been performed, the server SHOULD
add the client to the list of notification clients for the printer object or
server object, and it SHOULD notify the client by using RpcRouterReplyPrinter
or RpcRouterReplyPrinterEx when the object changes.</p>
<p>The choice of notification
methods does not depend on whether notifications have been requested using
RpcRemoteFindFirstPrinterChangeNotification or <a href="eb66b221-1c1f-4249-b8bc-c5befec2314d" data-linktype="relative-path">RpcRemoteFindFirstPrinterChangeNotificationEx</a>.
It is based on whether notifications can be expressed in the <i>fdwFlags</i>
parameter of RpcRouterReplyPrinter alone, or if additional information is
required to be provided using the additional parameters of
RpcRouterReplyPrinterEx.</p>
</li><li><p><span><span> 
</span></span>Return the status of the operation.</p>
</li></ul></div>