NDK_FN_CREATE_MW callback function (ndkpi.h)

The NdkCreateMw (NDK_FN_CREATE_MW) function creates an NDK memory window (MW) object.

Syntax

NDK_FN_CREATE_MW NdkFnCreateMw;

NTSTATUS NdkFnCreateMw(
  [in]           NDK_PD *pNdkPd,
  [in]           NDK_FN_CREATE_COMPLETION CreateCompletion,
  [in, optional] PVOID RequestContext,
                 NDK_MW **ppNdkMw
)
{...}

Parameters

[in] pNdkPd

A pointer to an NDK protection domain (PD) object (NDK_PD).

[in] CreateCompletion

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

[in, optional] RequestContext

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

ppNdkMw

A pointer to a created MW object (NDK_MW) is returned in this location if the request succeeds without returning STATUS_PENDING. If the request returns STATUS_PENDING then this parameter is ignored and the created object is returned with the callback that is specified in the CreateCompletion parameter.

Return value

The NdkCreateMw function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The MW object was created successfully and returned with the *ppNdkMw 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 NdkCreateMw function creates an NDK memory window (MW) object that can be used for bind requests. If the function returns STATUS_SUCCESS, the created object is returned in the ppNdkMw parameter. If NdkCreateMw returns STATUS_PENDING, the created object is returned by the NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that is specified in the CreateCompletion parameter.

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

NDK_FN_CREATE_COMPLETION

NDK_MW

NDK_PD