PeerGraphSetPresence function (p2p.h)
The PeerGraphSetPresence function explicitly turns on or off the publication of presence records for a specific node. This function can override the presence settings in the peer graph properties. Calling this function enables nodes to be enumerated with PeerGraphEnumNodes.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphSetPresence(
[in] HGRAPH hGraph,
[in] BOOL fPresent
);
Parameters
[in] hGraph
Handle to a peer graph.
[in] fPresent
Specify TRUE to force the Peer Graphing Infrastructure to publish a presence record for this node, which overrides the setting specified by the cPresenceMax in PEER_GRAPH_PROPERTIES. Specify FALSE to return the node to the default behavior specified in the peer graph properties.
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 handle to the peer graph is invalid. The presence information cannot be published. |
|
The peer graph must be initialized with a call to PeerGraphStartup before using this function. |
Remarks
If presence information has not been explicitly published by the peer graph, the nodes are not visible when a peer graph is enumerated.
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 |