NetPowerSettingsIsWakePatternEnabled 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.

Determines if a wake-on-LAN (WoL) pattern is enabled for a network adapter.

Syntax

BOOLEAN NetPowerSettingsIsWakePatternEnabled(
  NETPOWERSETTINGS    NetPowerSettings,
  NDIS_PM_WOL_PATTERN *NdisPmWolPattern
);

Parameters

NetPowerSettings

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

NdisPmWolPattern

A pointer to an NDIS_PM_WOL_PATTERN structure obtained by calling NetPowerSettingsGetWakePattern.

Return Value

Returns TRUE if the WoL pattern is enabled and the driver must enable it in its hardware, and FALSE otherwise.

Remarks

The client driver must only call NetPowerSettingsIsWakePatternEnabled 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_WAKE_PATTERN callback function. Otherwise, the call results in a system bugcheck.

If the wake pattern is enabled, the driver programs its hardware to enable the pattern during a power down transition.

Requirements

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

See Also

NDIS_PM_WOL_PATTERN