NDK_FN_DISCONNECT_EVENT_CALLBACK_EX - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndkpi.h

NDK_FN_DISCONNECT_EVENT_CALLBACK_EX NdkFnDisconnectEventCallbackEx;

VOID NdkFnDisconnectEventCallbackEx(
  [in, optional] PVOID DisconnectEventContext,
  [in]           ULONG ProviderDisconnectReason
)
{...}

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ndkpi-ndk_fn_disconnect_event_callback_ex)

Description

The NdkDisconnectEventCallbackEx (NDK_FN_DISCONNECT_EVENT_CALLBACK_EX) function is called by the NDK provider once when the peer disconnects.

Parameters

DisconnectEventContext [in, optional]

A context area that was specified in the DisconnectEvent parameter of the NdkCompleteConnectEx (NDK_FN_COMPLETE_CONNECT_EX) or NdkAcceptEx (NDK_FN_ACCEPT_EX) function when the completion queue (CQ) object was created.

ProviderDisconnectReason [in]

A provider specific code that indicates why the connection has disconnected.

Zero indicates the NDK provider does not support the disconnect reason capability yet or did not provide one.

Remarks

[!NOTE] This routine is implemented by the NDK consumer and passed to the NDK provider.

NdkDisconnectEventCallbackEx is a callback function for connection disconnect events. A disconnect notification callback function is specified for a connection with the NdkCompleteConnectEx (NDK_FN_COMPLETE_CONNECT_EX) function on the initiator side and with the NdkAcceptEx (NDK_FN_ACCEPT_EX) function on the listener side. The NDK provider invokes this callback only once when the peer disconnects. The provider should not flush outstanding work requests when it indicates a disconnect event because of an incoming disconnect request from the peer.

See also

NDK_FN_COMPLETE_CONNECT_EX

NDK_FN_ACCEPT_EX