PeerGroupClose function (p2p.h)

The PeerGroupClose function invalidates the peer group handle obtained by a previous call to the PeerGroupCreate, PeerGroupJoin, or PeerGroupOpen function.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupClose(
  [in] HGROUP hGroup
);

Parameters

[in] hGroup

Handle to the peer group to close. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

Return value

Returns S_OK if the operation succeeds. Otherwise, the function returns the following value.

Return code Description
PEER_E_INVALID_GROUP
The handle to the peer group is invalid.
 

Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.

Remarks

If the peer group handle closed is the last handle that refers to a peer group shared across multiple applications or processes, the call also closes the respective network connections for the peer.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also

PeerGroupCreate

PeerGroupJoin

PeerGroupOpen