NetWakeSourceListGetElement function (netwakesourcelist.h)
The NetWakeSourceListGetElement function gets a wake source from the list of wake sources for a net adapter.
Syntax
NETWAKESOURCE NetWakeSourceListGetElement(
[_In_] const NET_WAKE_SOURCE_LIST *List,
[_In_] SIZE_T Index
);
Parameters
[_In_] List
A handle to a driver-allocated and initialized NET_WAKE_SOURCE_LIST structure.
[_In_] Index
The zero-based index in the list for the target NETWAKESOURCE object. This function must be less than the value returned by NetWakeSourceListGetCount.
Return value
Returns the NETWAKESOURCE object, which represents the wake source, at the specified index in the list.
Remarks
Call NetWakeSourceListGetCount to get the number of wake sources before calling this function.
The client driver must only call NetWakeSourceListGetElement 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 |