3.1.4.9.2 RpcSyncUnRegisterForRemoteNotifications (Opnum 59)

RpcSyncUnRegisterForRemoteNotifications closes a notification handle opened by calling RpcSyncRegisterForRemoteNotifications (section 3.1.4.9.1).

 HRESULT RpcSyncUnRegisterForRemoteNotifications(
   [in, out] RMTNTFY_HANDLE* phRpcHandle
 );

phRpcHandle: A pointer to the remote notification handle from which the user no longer wants to receive notifications.

Return Values: This method returns either an HRESULT success value ([MS-ERREF] section 2.1) to indicate successful completion or an HRESULT error value to indicate failure.

Exceptions Thrown: This method MUST NOT throw any exceptions other than those that are thrown by the underlying RPC protocol [MS-RPCE].

Parameter Validation Requirements: Upon receiving this method call, the server MUST verify that the phRpcHandle parameter is not NULL, and that it points to a non-NULL RMTNTFY_HANDLE (section 2.2.5) that is associated with a valid notification object created by a call to RpcSyncRegisterForRemoteNotifications (section 3.1.4.9.1).

If parameter validation fails, the server MUST return immediately, with a failure indication in its response to the client.

Processing and Response Requirements: If the operation is successful, the server MUST execute the following steps before returning:

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

  • Delete the notification object associated with the RMTNTFY_HANDLE specified by the phRpcHandle parameter.