3.1.4.10.2 RpcFindClosePrinterChangeNotification (Opnum 56)

The RpcFindClosePrinterChangeNotification method closes a change notification object created by RpcRemoteFindFirstPrinterChangeNotification (section 3.1.4.10.3) or RpcRemoteFindFirstPrinterChangeNotificationEx (section 3.1.4.10.4).<380> The printer or print server associated with the change notification object is no longer monitored by that object.

 DWORD RpcFindClosePrinterChangeNotification(
   [in] PRINTER_HANDLE hPrinter
 );

hPrinter: A handle to a printer object or server object that was opened by RpcAddPrinter (section 3.1.4.2.3), RpcAddPrinterEx (section 3.1.4.2.15), RpcOpenPrinter (section 3.1.4.2.2), or RpcOpenPrinterEx (section 3.1.4.2.14).

Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure [MS-ERREF].

Upon receiving this message, the server MUST validate parameters as follows:

  • Perform validation steps as specified in PRINTER_HANDLE Parameters, section 3.1.4.1.11. This method SHOULD assume that the handle to the printer or server object can be used without further access checks.

  • Verify that there is a change notification object associated with the printer object handle.

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:

  • Clear all internal change notification objects associated with the hPrinter.

  • Remove the client from the list of notification clients for the server or printer object.

  • Return the status of the operation.