PeerGroupDelete function (p2p.h)
The PeerGroupDelete function deletes the local data and certificate associated with a peer group.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupDelete(
[in] PCWSTR pwzIdentity,
[in] PCWSTR pwzGroupPeerName
);
Parameters
[in] pwzIdentity
Pointer to a Unicode string that contains the identity opening the specified peer group. If this parameter is NULL, the implementation uses the identity obtained from PeerIdentityGetDefault.
[in] pwzGroupPeerName
Pointer to a Unicode string that contains the peer name of the peer group for which data is deleted. This parameter is required. The group name can be obtained by calling PeerGroupGetProperties prior to PeerGroupClose, or by parsing the invitation with PeerGroupParseInvitation.
Return value
Returns S_OK if the operation succeeds. Otherwise, the function returns one of the following values.
Return code | Description |
---|---|
|
Access to the peer group database is denied. Ensure that the peer has permission to perform this operation. In this case, the peer must be the original creator of the peer group. |
|
One of the parameters is invalid. |
|
The peer group cannot be found. |
|
Access to the identity or peer group keys is denied. Typically, this is caused by an incorrect access control list (ACL) for the folder that contains the user or computer keys. This can happen when the ACL is reset manually. |
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 a peer group is deleted, all handles associated with that group immediately become invalid. As a best practice, ensure that all handles for this group are closed before calling this function. Otherwise, this data is deleted from all other running peer applications that use it, which can cause errors and instability.
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 |