NDK_FN_CREATE_LISTENER callback function

The NdkCreateListener (NDK_FN_CREATE_LISTENER) function creates an NDK listener object.

Syntax

NDK_FN_CREATE_LISTENER NdkFnCreateListener;

NTSTATUS NdkFnCreateListener(
  NDK_ADAPTER *pNdkAdapter,
  NDK_FN_CONNECT_EVENT_CALLBACK ConnectEvent,
  PVOID ConnectEventContext,
  NDK_FN_CREATE_COMPLETION CreateCompletion,
  PVOID RequestContext,
  NDK_LISTENER **ppNdkListener
)
{...}

Parameters

pNdkAdapter

ConnectEvent

A pointer to the NdkConnectEventCallback function (NDK_FN_CONNECT_EVENT_CALLBACK) that the provider uses to notify the consumer for each incoming connection request.

ConnectEventContext

A context value that the NDK provider passes back to the NdkConnectEventCallback function that is specified in the ConnectEvent parameter.

CreateCompletion

A pointer to an NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that completes the creation of an NDK object.

RequestContext

A context value that the NDK provider passes back to the NdkCreateCompletion function that is specified in the CreateCompletion parameter.

*ppNdkListener

Return Value

The NdkCreateListener function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The listener object was created successfully and returned with the *ppNdkListener parameter.
STATUS_PENDING
The operation is pending and will be completed later. The provider will call the function specified in the CreateCompletion parameter(NDK_FN_CREATE_COMPLETION) to complete the pending operation.
STATUS_INSUFFICIENT_RESOURCES
The request failed due to insufficient resources.
Important  The request can fail inline as well as asynchronously with this status code.
 
Other status codes
An error occurred.

Remarks

The NdkCreateListener function creates an NDK listener object. If the function returns STATUS_SUCCESS, the created object is returned in the ppNdkListener parameter. If NdkCreateListener returns STATUS_PENDING, the created object is returned by the NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that is specified in the CreateCompletion parameter.

Requirements

   
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

NDK_ADAPTER

NDK_ADAPTER_DISPATCH

NDK_FN_CONNECT_EVENT_CALLBACK

NDK_FN_CREATE_COMPLETION

NDK_LISTENER