Bewerken

Delen via


NetPowerOffloadListGetCount function (netpoweroffloadlist.h)

The NetPowerOffloadListGetCount function gets the number of low power protocol offloads to a net adapter.

Syntax

SIZE_T NetPowerOffloadListGetCount(
  [_In_] const NET_POWER_OFFLOAD_LIST *List
);

Parameters

[_In_] List

A pointer to a driver-allocated and initialized NET_POWER_OFFLOAD_LIST structure.

Return value

Returns the number of low power offloads to this net adapter.

Remarks

Call NET_POWER_OFFLOAD_LIST_INIT to initialize the NET_POWER_OFFLOAD_LIST structure, then call NetDeviceGetPowerOffloadList to retrieve the low power protocol offload list. After getting the list, call this function to determine how many low power protocol offloads there are to this net adapter.

The client driver must only call NetPowerOffloadListGetCount during a power transition, typically from its EVT_WDF_DEVICE_ARM_WAKE_FROM_SX, EVT_WDF_DEVICE_ARM_WAKE_FROM_S0, or EVT_NET_DEVICE_PREVIEW_POWER_OFFLOAD callback function. Otherwise, the call results in a system bugcheck.

For a code sample of working with NETPOWEROFFLOAD objects, see Configuring power management.

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004
Target Platform Universal
Minimum UMDF version 2.33
Header netpoweroffloadlist.h (include netadaptercx.h)
IRQL PASSIVE_LEVEL

See also

Configuring power management

NET_POWER_OFFLOAD_LIST_INIT

NET_POWER_OFFLOAD_LIST

NetDeviceGetPowerOffloadList