NetAdapterInitAllocate - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netadapter.h

NETADAPTER_INIT * NetAdapterInitAllocate(
  [_In_] WDFDEVICE Device
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-netadapter-netadapterinitallocate)

NetAdapterInitAllocate function

Description

The NetAdapterInitAllocate function allocates a NETADAPTER_INIT structure that a client driver uses when creating a new NETADAPTER object.

Parameters

Device [_In_]

A handle to a framework device object.

Return value

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.

Remarks

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.

See also

Device initialization

NetAdapterCreate

NetAdapterInitFree