NetDeviceGetWakeSourceList function (netwakesourcelist.h)

The NetDeviceGetWakeSourceList function gets the list of wake sources for a net adapter.

Syntax

void NetDeviceGetWakeSourceList(
  [_In_]    WDFDEVICE            Device,
  [_Inout_] NET_WAKE_SOURCE_LIST *List
);

Parameters

[_In_] Device

The WDFDEVICE object that is associated with the net adapter (or multiple adapters if the client driver has more than one for this device).

[_Inout_] List

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

Return value

None

Remarks

Call NET_WAKE_SOURCE_LIST_INIT to initialize the NET_WAKE_SOURCE_LIST structure, then call this function to retrieve the wake source list.

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

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

Requirements

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

See also

Configuring power management

NET_WAKE_SOURCE_LIST_INIT

NET_WAKE_SOURCE_LIST