TdiPnPPowerComplete function

The TdiPnPPowerComplete function indicates the client has completed the processing of a power-state-change notification for which the client originally returned STATUS_PENDING to TDI.

Syntax

VOID TdiPnPPowerComplete(
  _In_ HANDLE         BindingHandle,
  _In_ PNET_PNP_EVENT PowerEvent,
  _In_ NTSTATUS       Status
);

Parameters

  • BindingHandle [in]
    Specifies the handle returned by a preceding call to TdiRegisterPnPHandlers.

  • PowerEvent [in]
    Specifies the pointer, passed as an input parameter to the ClientPnPPowerChange routine, to the NET_PNP_EVENT structure.

  • Status [in]
    Specifies the final status of the power-state-change operation for which the client previously returned STATUS_PENDING.

Return value

None

Remarks

If the input Status is anything other than STATUS_SUCCESS, TdiPnPPowerComplete notifies the transport that its attempt to change the power state has failed. A TDI client returns an error status, such as STATUS_FILES_OPEN or STATUS_UNSUCCESSFUL, for Status when one of its own (application) clients rejects a proposed power-state change for a valid reason. For example, such a failure from an application to the TDI client might mean that the application had sent a message to the end user warning that a device removal would compromise ongoing network transfers to which the user responded by canceling the removal of the underlying NIC.

It is a programming error for a caller of TdiPnPPowerComplete to return STATUS_PENDING.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

Requirements

Target platform

Universal

Header

Tdikrnl.h (include TdiKrnl.h)

Library

Tdi.lib

IRQL

< DISPATCH_LEVEL

See also

ClientPnPPowerChange

NET_PNP_EVENT for Protocol Drivers

TdiPnPPowerRequest

 

 

Send comments about this topic to Microsoft