PeerCollabUnsubscribeEndpointData function (p2p.h)

The PeerCollabUnsubscribeEndpointData function removes a subscription to an endpoint created with PeerCollabSubscribeEndpointData.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabUnsubscribeEndpointData(
  [in] const PCPEER_ENDPOINT pcEndpoint
);

Parameters

[in] pcEndpoint

Pointer to a PEER_ENDPOINT structure that contains the peer endpoint that is used to remove the subscription.

Return value

Returns S_OK if the function succeeds. Otherwise, the function returns one of the following values.

Return code Description
E_OUTOFMEMORY
There is not enough memory to support this operation.
E_INVALIDARG
One of the arguments is invalid.
PEER_E_NOT_INITIALIZED
The Windows Peer infrastructure is not initialized. Calling the relevant initialization function is required.

Remarks

Each call is reference counted. As a result, the peer is unsubscribed only when the last reference is released.

The PeerCollabUnsubscribeEndpointData function will timeout at 30 seconds.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also

PeerCollabSubscribeEndpointData