NDK_FN_CLOSE_OBJECT callback function (ndkpi.h)

The NdkCloseObject (NDK_FN_CLOSE_OBJECT) function initiates a close request for an NDK object.

Syntax

NDK_FN_CLOSE_OBJECT NdkFnCloseObject;

NTSTATUS NdkFnCloseObject(
  [in]           NDK_OBJECT_HEADER *pNdkObject,
  [in]           NDK_FN_CLOSE_COMPLETION CloseCompletion,
  [in, optional] PVOID RequestContext
)
{...}

Parameters

[in] pNdkObject

A pointer to the object header (NDK_OBJECT_HEADER) for the object to close.

[in] CloseCompletion

A pointer to an NdkCloseCompletion close completion callback function (NDK_FN_CLOSE_COMPLETION).

[in, optional] RequestContext

A context value for the NDK provider to pass back to the NdkCloseCompletion function that is specified in the CloseCompletion parameter.

Return value

The NdkCloseObject function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The NDK object is closed. The provider will not call the NdkCloseCompletion function.
STATUS_PENDING
The request is pending, the provider will call the NdkCloseCompletion function to complete the operation asynchronously. The close request has been successfully initiated, but it might not be completed.
Other status codes
An error occurred.

Remarks

The function dispatch table for each type of NDK object includes an NDK_FN_CLOSE_OBJECT function pointer. Close requests are asynchronous. An NDK consumer must not access the object after a close request is started.

The NDK provider must ensure that the NdkCloseCompletion function (NDK_FN_CLOSE_COMPLETION) is the last callback called for the object that is closing. The provider must ensure that all outstanding asynchronous requests are completed and all in-progress callbacks have returned and further callbacks are prevented before the provider calls the NdkCloseCompletion function. After the provider calls the NdkCloseCompletion function, the provider not call any completion functions or notification callback functions for the object.

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_CONNECTOR_DISPATCH

NDK_CQ_DISPATCH

NDK_FN_CLOSE_COMPLETION

NDK_OBJECT_HEADER