NetPowerSettingsGetProtocolOffloadCount function

Warning

Some information in this topic relates to prereleased product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

NetAdapterCx is preview only in Windows 10, version 1903.

Retrieves the number of protocol offload structures associated with a NETPOWERSETTINGS object.

Syntax

ULONG NetPowerSettingsGetProtocolOffloadCount(
  NETPOWERSETTINGS NetPowerSettings
);

Parameters

NetPowerSettings

A handle to the NETPOWERSETTINGS object associated with the net adapter. To retrieve the handle, call NetAdapterGetPowerSettings.

Return Value

Returns the total number of enabled and disabled protocol offload structures associated with a NETPOWERSETTINGS object.

Remarks

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

To determine if a specific protocol offload is enabled, call NetPowerSettingsIsProtocolOffloadEnabled.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.23
Header netpowersettings.h (include netadaptercx.h)
Library NetAdapterCxStub.lib
IRQL PASSIVE_LEVEL