MINIPORT_WDI_ALLOCATE_ADAPTER callback function (dot11wdi.h)

Important

This topic is part of the WDI driver model released in Windows 10. The WDI driver model is in maintenance mode and will only receive high priority fixes. WiFiCx is the Wi-Fi driver model released in Windows 11. We recommend that you use WiFiCx to take advantage of the latest features.

The MiniportWdiAllocateAdapter handler function allocates a WDI miniport adapter.

This is a WDI miniport handler inside NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS.

Note  You must declare the function by using the MINIPORT_WDI_ALLOCATE_ADAPTER type. For more information, see the following Examples section.
 

Syntax

MINIPORT_WDI_ALLOCATE_ADAPTER MiniportWdiAllocateAdapter;

NDIS_STATUS MiniportWdiAllocateAdapter(
  [in]      NDIS_HANDLE NdisMiniportHandle,
  [in]      NDIS_HANDLE MiniportDriverContext,
  [in]      PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters,
  [in]      PNDIS_WDI_INIT_PARAMETERS NdisWdiInitParameters,
  [in, out] PNDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES RegistrationAttributes
)
{...}

Parameters

[in] NdisMiniportHandle

The NDIS-supplied handle that identifies the miniport adapter.

[in] MiniportDriverContext

The handle to a driver-allocated context area where the driver maintains state and configuration information. The miniport driver passed this context area to the NdisMRegisterWdiMiniportDriver function.

[in] MiniportInitParameters

A pointer to an NDIS_MINIPORT_INIT_PARAMETERS structure that defines the initialization parameters for the miniport adapter.

[in] NdisWdiInitParameters

A pointer to an NDIS_WDI_INIT_PARAMETERS structure that defines the WDI initialization parameters for the miniport adapter.

[in, out] RegistrationAttributes

A pointer to an NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure that defines registration attributes that are associated with the miniport adapter.

Return value

MiniportWdiAllocateAdapter can return any of the following return values.

Return code Description
NDIS_STATUS_SUCCESS
MiniportWdiAllocateAdapter successfully completed.
NDIS_STATUS_RESOURCES
MiniportWdiAllocateAdapter could not allocate the necessary resources.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Header dot11wdi.h

See also

NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES

NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS

NDIS_MINIPORT_INIT_PARAMETERS

NDIS_WDI_INIT_PARAMETERS