// ndkpi.h
NDK_FN_CLOSE_OBJECT NdkFnCloseObject;
NTSTATUS NdkFnCloseObject(
[in] NDK_OBJECT_HEADER *pNdkObject,
[in] NDK_FN_CLOSE_COMPLETION CloseCompletion,
[in, optional] PVOID RequestContext
)
{...}
View the official Windows Driver Kit DDI reference
No description available.
The NdkCloseObject (NDK_FN_CLOSE_OBJECT) function initiates a close request for an NDK object.
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.
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. |
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.
NDKPI Object Lifetime Requirements