NetAdapterInitSetNetRequestAttributes 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 NetAdapterInitSetNetRequestAttributes method sets the attributes of NETREQUEST objects created by NetAdapterCx for a net adapter.

Syntax

void NetAdapterInitSetNetRequestAttributes(
  NETADAPTER_INIT       *AdapterInit,
  WDF_OBJECT_ATTRIBUTES *NetRequestAttributes
);

Parameters

AdapterInit

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

NetRequestAttributes

A pointer to a driver-allocated and initialized WDF_OBJECT_ATTRIBUTES structure that contains attributes for the NETREQUEST objects created by NetAdapterCx.

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