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

The NetAdapterInitSetNetPowerSettingsAttributes method sets the attributes of a net adapter's NETPOWERSETTINGS object that is created by NetAdapterCx.

Syntax

void NetAdapterInitSetNetPowerSettingsAttributes(
  NETADAPTER_INIT       *AdapterInit,
  WDF_OBJECT_ATTRIBUTES *NetPowerSettingsAttributes
);

Parameters

AdapterInit

A pointer to a NETADAPTER_INIT structure that the driver obtained from a previous call to NetAdapterInitAllocate.

NetPowerSettingsAttributes

A pointer to a driver-allocated and initialized WDF_OBJECT_ATTRIBUTES structure that contains attributes for the adapter's NETPOWERSETTINGS object.

Return Value

This method does not return a value.

Remarks

This is an optional method.

Call this method after calling NetAdapterInitAllocate but before calling NetAdapterCreate.

If the driver encounters an error after the NETADAPTER_INIT allocation succeeds but before NetAdapterCreate succeeds, it must call NetAdapterInitFree to deallocate the NETADAPTER_INIT object.

For a code example of creating a NETADAPTER, see Device initialization.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.27
Header netadapter.h
Library netadaptercxstub.lib
IRQL PASSIVE_LEVEL

See Also

Device initialization

NetAdapterInitAllocate

NetAdapterInitFree

NetAdapterCreate