Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

RpcServerUnsubscribeForNotification function

The RpcServerUnsubscribeForNotification function unsubscribes the server from RPC notifications.

Syntax


RPC_STATUS RpcServerUnsubscribeForNotification(
  _In_   RPC_BINDING_HANDLE Binding,
  _In_   RPC_NOTIFICATIONS Notification,
  _Out_  unsigned long *NotificationsQueued
);

Parameters

Binding [in]

RPC_BINDING_HANDLE structure that contains the binding handle for the current RPC call specified in a previous call to RpcServerSubscribeForNotification. If this function is called on the same thread that RPC has dispatched a call on, this parameter can be set to NULL; otherwise, an explicit binding handle must be passed in this parameter.

Notification [in]

A value from the RPC_NOTIFICATIONS enumeration that specifies the type of notification requested from RPC by the server. Notifications must be unsubscribed individually, multiple values are not supported.

Windows Vista:  Currently, only RpcNotificationClientDisconnect and RpcNotificationCallCancel are supported. If any other value is specified for this parameter, the RPC_S_CANNOT_SUPPORT error code is returned.

NotificationsQueued [out]

Pointer to a value that receives the number of notifications successfully queued for the associated RPC call. The pointer must be supplied; it is not optional.

Return value

This function returns RPC_S_OK on success; otherwise, an RPC_S_* error code is returned.

Note  For a list of valid error codes, see RPC Return Values.

Remarks

RpcServerUnsubscribeForNotification must be called for every RPC binding handle that has also had RpcServerSubscribeForNotification called on it for the associated RPC call. This API must be called before the associated RPC call is completed; otherwise, the results are undefined and could lead to application instability.

Unretrieved notifications may be retrieved after this API returns.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only]

Header

Rpcasync.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

RpcServerSubscribeForNotification

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.