3.1.4.9.3 RpcSyncRefreshRemoteNotifications (Opnum 60)

RpcSyncRefreshRemoteNotifications gets notification information for all requested members. This SHOULD be called by a client if the "RemoteNotifyData Flags" key in the RpcPrintPropertiesCollection instance (section 2.2.4), which was returned as part of the notification from calling RpcAsyncGetRemoteNotifications (section 3.1.4.9.4), has the PRINTER_NOTIFY_INFO_DISCARDED bit set ([MS-RPRN] section 2.2.3.2).

 HRESULT RpcSyncRefreshRemoteNotifications(
   [in] RMTNTFY_HANDLE hRpcHandle,
   [in] RpcPrintPropertiesCollection* pNotifyFilter,
   [out] RpcPrintPropertiesCollection** ppNotifyData
 );

hRpcHandle: A remote notification handle that was opened by using RpcSyncRegisterForRemoteNotifications (section 3.1.4.9.1).

pNotifyFilter: A pointer to an RpcPrintPropertiesCollection instance that contains the caller-specified notification filter settings.

ppNotifyData: A pointer to a variable that receives a pointer to an RpcPrintPropertiesCollection instance that contains the notification data.

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 validate parameters as follows:

  • The hRpcHandle parameter MUST NOT be NULL and MUST be associated with a valid notification object created by a call to RpcSyncRegisterForRemoteNotifications (section 3.1.4.9.1).

  • The pNotifyFilter parameter MUST point to an instance of RpcPrintPropertiesCollection that has all the name-value pairs required to get notification data.

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

Processing and Response Requirements: If parameter validation succeeds, the server MUST process the method call by:

  • Storing the notification data requested by the client in the RpcPrintPropertiesCollection structure pointed to by ppNotifyData.

  • Returning a response that contains the status of the operation.

If the operation is successful, the server MUST make the following changes to printer object data before returning the response:

  • Store the notification synchronization value in the RpcPrintPropertiesCollection instance pointed to by pNotifyFilter, which corresponds to the "RemoteNotifyFilter Color" key. Store this value with the client information in the list of notification clients for the printer object or server so that the client can use it in RpcAsyncGetRemoteNotifications calls.

  • Delete the notification data associated with the notification handle that has been successfully sent.