NetAdapterCreate function

Creates a NETADAPTER object.

Syntax

NTSTATUS NetAdapterCreate(
  NETADAPTER_INIT       *AdapterInit,
  WDF_OBJECT_ATTRIBUTES *AdapterAttributes,
  NETADAPTER            *Adapter
);

Parameters

AdapterInit

A pointer to a NETADAPTER_INIT structure that the client driver previously received from a call to NetAdapterInitAllocate.

AdapterAttributes

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure. The structure’s ParentObject must be NULL. The parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

Adapter

A pointer to a location that receives a handle to the new NETADAPTER object.

Return value

The method returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method may return an appropriate NTSTATUS error code.

Remarks

After it has called WdfDeviceCreate, the client typically calls NetAdapterCreate from within its EvtDriverDeviceAdd routine.

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

The NETADAPTER object is a standard WDF object. The framework manages its deletion, which occurs when the parent WDFDEVICE is deleted.

Requirements

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