PeerGroupEnumRecords function (p2p.h)

The PeerGroupEnumRecords function creates an enumeration of peer group records.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupEnumRecords(
  [in]  HGROUP     hGroup,
  [in]  const GUID *pRecordType,
  [out] HPEERENUM  *phPeerEnum
);

Parameters

[in] hGroup

Handle to the peer group whose records are enumerated. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

[in] pRecordType

Pointer to a GUID value that uniquely identifies a specific record type. If this parameter is NULL, all records are returned.

[out] phPeerEnum

Pointer to the enumeration that contains the returned list of records. This handle is passed to
PeerGetNextItem to retrieve the items, with each item represented as a pointer to a PEER_RECORD structure. When finished, PeerEndEnumeration is called to return the memory used by the enumeration. This parameter is required.

Return value

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

Return code Description
E_INVALIDARG
One of the parameters is not valid.
E_OUTOFMEMORY
There is not enough memory to perform the specified operation.
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.

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

PeerEndEnumeration

PeerGetItemCount

PeerGetNextItem

PeerGroupGetRecord