Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The PeerGroupCloseDirectConnection function closes a specific direct connection between two peers.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupCloseDirectConnection(
[in] HGROUP hGroup,
[in] ULONGLONG ullConnectionId
);
Parameters
[in] hGroup
Handle to the peer group that contains the peers involved in the direct connection. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.
[in] ullConnectionId
Specifies the connection ID to disconnect from. This parameter is required and has no default value.
Return value
Returns S_OK if the operation succeeds. Otherwise, the function returns one of the following values.
| Return code | Description |
|---|---|
|
A direct connection that matches the supplied connection ID cannot be found. |
|
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.
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 |