PeerGroupGetRecord function (p2p.h)

The PeerGroupGetRecord function retrieves a specific group record.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupGetRecord(
  [in]  HGROUP       hGroup,
  [in]  const GUID   *pRecordId,
  [out] PPEER_RECORD *ppRecord
);

Parameters

[in] hGroup

Handle to a group that contains a specific record. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

[in] pRecordId

Specifies the GUID value that uniquely identifies a required record within a peer group. This parameter is required.

[out] ppRecord

Pointer to the address of a PEER_RECORD structure that contains a returned record. This structure is freed by passing its pointer to PeerFreeData. 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_GROUP_NOT_READY
The peer group is not in a state where group records can be retrieved. For example, PeerGroupJoin is called, but synchronization with the peer group database has not completed.
PEER_E_INVALID_GROUP
The handle to a peer group is invalid.
PEER_E_RECORD_NOT_FOUND
A record that matches the supplied ID cannot be found in a peer group database.
 

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

PEER_RECORD

PeerFreeData

PeerGroupCreate

PeerGroupDeleteRecord

PeerGroupEnumRecords

PeerGroupJoin

PeerGroupOpen