// netadapter.h
NETADAPTER_INIT * NetAdapterInitAllocate(
[_In_] WDFDEVICE Device
);
View the official Windows Driver Kit DDI referenceNo description available.
The NetAdapterInitAllocate function allocates a NETADAPTER_INIT structure that a client driver uses when creating a new NETADAPTER object.
Device [_In_]A handle to a framework device object.
Returns a pointer to a framework-allocated NETADAPTER_INIT structure if the operation succeeds. Otherwise, this function returns NULL.
[!IMPORTANT] If a client driver receives a NETADAPTER_INIT structure from a successful call to this function, the driver must always call NetAdapterInitFree to deallocate it regardless of the result of NetAdapterCreate.
A client driver calls NetAdapterInitAllocate to obtain a NETADAPTER_INIT structure that it can pass to NetAdapterCreate.
After NetAdapterInitAllocate succeeds, client drivers can optionally call NetAdapterInitSetXxx functions to set further initialization attributes for the NETADAPTER.
For a code example of creating a NETADAPTER, see Device initialization.