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 |
---|---|
|
One of the parameters is not valid. |
|
The peer graph has never been synchronized. Records cannot be retrieved until the peer graph has been synchronized. |
|
The handle to the peer graph is invalid. |
|
The peer graph must be initialized with a call to PeerGraphStartup before using this function. |
|
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 |