NDK_FN_COMPLETE_CONNECT callback function (ndkpi.h)
The NdkCompleteConnect (NDK_FN_COMPLETE_CONNECT) function completes an asynchronous connection request.
Syntax
NDK_FN_COMPLETE_CONNECT NdkFnCompleteConnect;
NTSTATUS NdkFnCompleteConnect(
[in] NDK_CONNECTOR *pNdkConnector,
[in, optional] NDK_FN_DISCONNECT_EVENT_CALLBACK DisconnectEvent,
[in, optional] PVOID DisconnectEventContext,
[in] NDK_FN_REQUEST_COMPLETION RequestCompletion,
[in, optional] PVOID RequestContext
)
{...}
Parameters
[in] pNdkConnector
A pointer to an NDK connector object (NDK_CONNECTOR).
[in, optional] DisconnectEvent
An optional disconnect notification callback NdkDisconnectEventCallback function(NDK_FN_DISCONNECT_EVENT_CALLBACK) that the provider calls when the peer disconnects.
[in, optional] DisconnectEventContext
A context value to pass back to the NdkDisconnectEventCallback function that is specified in the DisconnectEvent parameter.
[in] RequestCompletion
A pointer to a request completion callback NdkRequestCompletion function (NDK_FN_REQUEST_COMPLETION).
[in, optional] RequestContext
A context value that the provider passes back to the NdkRequestCompletion function that is specified in the RequestCompletion parameter.
Return value
The NDK_FN_COMPLETE_CONNECT function returns one of the following NTSTATUS codes.
Return code | Description |
---|---|
|
The request was completed successfully. |
|
The request is pending. The provider will call the NdkRequestCompletion function that is specified in the RequestCompletion parameter to complete the request asynchronously. |
|
The request failed because the queue pair is not connecting.
Important The request can fail inline as well as asynchronously with this status code.
|
|
The accepting peer abandoned the pending connection establishment. |
|
The request failed because the connection establishment timed out. This is not an indication of a catastrophic or permanent failure, but it ends connection establishment for this connector.
Important The request can fail inline as well as asynchronously with this status code.
|
|
An error occurred. |
Remarks
The NdkCompleteConnect function completes a connection request that was initiated by a previous call to the NdkConnect (NDK_FN_CONNECT) function. The NDK consumer calls NdkCompleteConnect after the peer accepts the connection request.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported,Supported in NDIS 6.30 and later. |
Minimum supported server | Windows Server 2012 |
Target Platform | Windows |
Header | ndkpi.h (include Ndkpi.h) |
IRQL | <=DISPATCH_LEVEL |
See also
NDKPI Object Lifetime Requirements