Skip to content

Latest commit

 

History

History
157 lines (122 loc) · 3.63 KB

nf-p2p-peergraphconnect.md

File metadata and controls

157 lines (122 loc) · 3.63 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:p2p.PeerGraphConnect
PeerGraphConnect function (p2p.h)
The PeerGraphConnect function attempts to make a connection to a specified node in a peer graph.
PeerGraphConnect
PeerGraphConnect function [Peer Networking]
p2p.peergraphconnect
p2p/PeerGraphConnect
p2p\peergraphconnect.htm
p2p
76a2c54d-4424-4aa3-9b62-3ebe88b63c9f
12/05/2018
PeerGraphConnect, PeerGraphConnect function [Peer Networking], p2p.peergraphconnect, p2p/PeerGraphConnect
p2p.h
Windows
Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP
None supported
P2PGraph.lib
P2PGraph.dll
Windows
19H1
PeerGraphConnect
p2p/PeerGraphConnect
c++
APIRef
kbSyntax
DllExport
P2PGraph.dll
PeerGraphConnect

PeerGraphConnect function

-description

The PeerGraphConnect function attempts to make a connection to a specified node in a peer graph. This function starts an asynchronous operation. The calling application must wait for a PEER_GRAPH_EVENT_NEIGHBOR_CONNECTION event to determine if the connection attempt is successful.

-parameters

-param hGraph [in]

Handle to a peer graph.

-param pwzPeerId [in]

The unique ID of a peer to connect to at pAddress. Specify NULL to connect to any peer listening at a specified address in the same peer graph.

-param pAddress [in]

Pointer to a PEER_ADDRESS structure that identifies a node to connect to.

-param pullConnectionId [out]

Receives the pointer to an ULONGLONG that contains the connection ID. This ID can be used with the direct communication functions.

-returns

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.
E_OUTOFMEMORY
There is not enough memory to perform a specified operation.
PEER_E_ALREADY_EXISTS
A neighbor connection to a specified node already exists.
PEER_E_INVALID_GRAPH
The handle to a peer graph is invalid.
PEER_E_NOT_INITIALIZED
A graph must be initialized with a call to PeerGraphStartup before using this function.

-see-also

PEER_ADDRESS

PeerGraphGetEventData

PeerGraphListen

PeerGraphOpenDirectConnection

PeerGraphSendData