PeerGraphGetRecord function (p2p.h)

The PeerGraphGetRecord function retrieves a specific record based on the specified record ID. The returned record should be freed by calling PeerGraphFreeData.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphGetRecord(
  [in]  HGRAPH       hGraph,
  [in]  const GUID   *pRecordId,
  [out] PPEER_RECORD *ppRecord
);

Parameters

[in] hGraph

Handle to the peer graph.

[in] pRecordId

Pointer to record ID to retrieve.

[out] ppRecord

Receives the requested record. When this structure is no longer required, free it by calling PeerGraphFreeData.

Return value

If the function call succeeds, the return value is S_OK. Otherwise, it returns one of the following values.

Return code Description
E_INVALIDARG
One of the parameters is not valid.
PEER_E_GRAPH_NOT_READY
The peer graph has never been synchronized. Records cannot be retrieved until the peer graph has been synchronized.
PEER_E_INVALID_GRAPH
The handle to the peer graph is invalid.
PEER_E_NOT_INITIALIZED
The peer graph must be initialized with a call to PeerGraphStartup before using this function.
PEER_E_RECORD_NOT_FOUND
The specified record was not found.

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 P2PGraph.lib
DLL P2PGraph.dll

See also

PEER_RECORD

PeerGraphFreeData