PeerGraphGetNodeInfo function (p2p.h)

The PeerGraphGetNodeInfo function retrieves information about a specific node.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphGetNodeInfo(
  HGRAPH          hGraph,
  ULONGLONG       ullNodeId,
  PPEER_NODE_INFO *ppNodeInfo
);

Parameters

hGraph

Handle to a peer graph.

ullNodeId

Specifies the ID of a node that an application receives information about. Specify zero (0) to retrieve information about the local node.

ppNodeInfo

Receives a pointer to a PEER_NODE_INFO structure that contains the requested information. When the handle is not needed, free it by calling PeerGraphFreeData.

Return value

If the function succeeds, the return value is S_OK. Otherwise, the function returns one of the following error codes.

Return code Description
E_INVALIDARG
One parameter is not valid.
E_OUTOFMEMORY
There is not enough memory to perform a specified operation.
PEER_E_INVALID_GRAPH
The handle to a peer graph is invalid.
PEER_E_NOT_INITIALIZED
A peer graph must be initialized by using a call to PeerGraphStartup before using this function.
PEER_E_NODE_NOT_FOUND
A specified node is not found.

Remarks

There can be several nodes of a graph on a computer. For example, multiple users may have joined the graph on a specific computer, so the information that PeerGraphGetNodeInfo returns is about each node—not each computer.

Requirements

   
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_NODE_INFO

PeerGraphFreeData