VOID
TdiBuildConnect (
IN PIRP Irp,
IN PDEVICE_OBJECT DevObj,
IN PFILE_OBJECT FileObj,
IN PVOID CompRoutine,
IN PVOID Contxt,
IN PLARGE_INTEGER Time,
IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo
);
TdiBuildConnect sets up an internal device control IRP for a TDI_CONNECT request to the underlying transport in which a local-node client has already associated an address and a connection endpoint.
An explicit time-out must be specified as the negative of the number of
100-nanosecond intervals, relative to the current system time, that its
connection attempt is allowed to remain pending before the transport fails
this connect request. If this pointer is NULL, the transport uses its own
default time-out interval for establishing a connection with any remote node.
TdiBuildConnect sets IRP_MJ_INTERNAL_DEVICE_CONTROL as the MajorFunction and TDI_CONNECT as the MinorFunction codes in the transport's I/O stack location of the given IRP.
If the specified endpoint is inactive or nonexistent, the transport fails the connect request. If the specified endpoint has not been associated with a local-node address, the transport also fails the connect request.
For a local-node client to establish an endpoint-to-endpoint connection with a remote-node peer process, it must first associate an idle local connection endpoint with a local-node address. A client cannot initiate a connection attempt to a remote-node peer until it has made a successful TDI_ASSOCIATE_ADDRESS request, which it set up with TdiBuildAsociateAddress, to its underlying transport.
For a local-node client's connect request to succeed, the remote-node client must have an open listen request or a registered ClientEventConnect routine that can receive notification from its underlying transport of connection offers.
ClientEventConnect, TdiBuildAssociateAddress, TdiBuildInternalDeviceControlIrp, TdiBuildListen, TdiBuildSetEventHandler, TDI_CONNECT, TDI_CONNECTION_INFORMATION