PeerGroupGetRecord function

The PeerGroupGetRecord function retrieves a specific group record.

Syntax


HRESULT WINAPI PeerGroupGetRecord(
  _In_        HGROUP       hGroup,
  _In_  const GUID         *pRecordId,
  _Out_       PPEER_RECORD *ppRecord
);

Parameters

hGroup [in]

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

pRecordId [in]

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

ppRecord [out]

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 codeDescription
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

Minimum supported client

Windows XP with SP2 [desktop apps only]

Minimum supported server

None supported

Version

Windows XP with SP1 with the Advanced Networking Pack forWindows XP

Header

P2P.h

Library

P2P.lib

DLL

P2P.dll

See also

PEER_RECORD
PeerFreeData
PeerGroupCreate
PeerGroupDeleteRecord
PeerGroupEnumRecords
PeerGroupJoin
PeerGroupOpen

 

 

Community Additions

ADD
Show: