PeerGraphSetNodeAttributes function (p2p.h)
The PeerGraphSetNodeAttributes function sets the attributes of the PEER_NODE_INFO structure for the local node.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphSetNodeAttributes(
[in] HGRAPH hGraph,
[in] PCWSTR pwzAttributes
);
Parameters
[in] hGraph
Handle to the peer graph.
[in] pwzAttributes
Pointer to a string that represents the attributes the application associates with the local node. This string is a free-form text string that is specific to the application. Specify NULL to delete all attributes for the specified node.
Return value
If the function call succeeds, the return value is S_OK. Otherwise, it returns one of the following value.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
There is not enough memory to perform the specified operation. |
|
The handle to the peer graph is invalid. |
|
The peer graph must be initialized with a call to PeerGraphStartup before using this function. |
Remarks
To retrieve attributes for a node, call PeerGraphGetNodeInfo.
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 |