// netadapter.h
NTSTATUS NetAdapterCreate(
[_In_] NETADAPTER_INIT *AdapterInit,
[_In_opt_] WDF_OBJECT_ATTRIBUTES *AdapterAttributes,
[_Out_] NETADAPTER *Adapter
);
View the official Windows Driver Kit DDI referenceNo description available.
Creates a NETADAPTER object.
AdapterInit [_In_]A pointer to a NETADAPTER_INIT structure that the client driver previously received from a call to NetAdapterInitAllocate.
AdapterAttributes [_In_opt_]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 [_Out_]A pointer to a location that receives a handle to the new NETADAPTER object.
The function returns STATUS_SUCCESS if the operation succeeds. Otherwise, this function may return an appropriate NTSTATUS error code.
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.