NDK_FN_CLOSE_OBJECT routine

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

Syntax


NDK_FN_CLOSE_OBJECT NdkCloseObject;

NTSTATUS NdkCloseObject(
  _In_      NDK_OBJECT_HEADER *pNdkObject,
  _In_      NDK_FN_CLOSE_COMPLETION CloseCompletion,
  _In_opt_  PVOID RequestContext
)
{ ... }

Parameters

pNdkObject [in]

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

CloseCompletion [in]

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

RequestContext [in, optional]

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 codeDescription
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

Minimum supported client

None supported

Minimum supported server

Windows Server 2012

Version

Supported in NDIS 6.30 and later.

Header

Ndkpi.h (include Ndkpi.h)

IRQL

<=DISPATCH_LEVEL

See also

NDK_CONNECTOR_DISPATCH
NDK_CQ_DISPATCH
NDK_FN_CLOSE_COMPLETION
NDK_OBJECT_HEADER
NDKPI Object Lifetime Requirements

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft