NdisMRegisterWdiMiniportDriver 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.

A miniport driver calls the NdisMRegisterWdiMiniportDriver function to register MiniportWdiXxx entry points with NDIS as the first step in initialization.

Syntax

NDIS_EXPORTED_ROUTINE NDIS_STATUS NdisMRegisterWdiMiniportDriver(
  [in]           DRIVER_OBJECT                            *DriverObject,
  [in]           PCUNICODE_STRING                         RegistryPath,
  [in, optional] NDIS_MINIPORT_DRIVER_CONTEXT             NdisDriverContext,
  [in]           NDIS_MINIPORT_DRIVER_CHARACTERISTICS     *MiniportDriverCharacteristics,
  [in]           NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS *MiniportWdiCharacteristics,
  [out]          NDIS_MINIPORT_DRIVER_HANDLE              *NdisMiniportDriverHandle
);

Parameters

[in] DriverObject

A pointer to an opaque driver object that the miniport driver received in its DriverEntry routine at the Argument1 parameter (see DriverEntry of NDIS Miniport Drivers).

[in] RegistryPath

A pointer to an opaque registry path that the miniport driver received in its DriverEntry routine at the Argument2 parameter.

[in, optional] NdisDriverContext

A handle to a driver-allocated context area where the driver maintains state and configuration information.

[in] MiniportDriverCharacteristics

A pointer to an NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure that the caller initialized.

[in] MiniportWdiCharacteristics

A pointer to an NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS structure that the caller initialized.

[out] NdisMiniportDriverHandle

A pointer to a caller-supplied handle variable. NDIS writes a handle to this variable that uniquely identifies this driver. The driver must save this handle for use in subsequent NdisXxx function calls.

Return value

NdisMRegisterWdiMiniportDriver can return any of the following return values.

Return code Description
NDIS_STATUS_SUCCESS
NdisMRegisterWdiMiniportDriver registered the WDI miniport driver successfully.
NDIS_STATUS_BAD_CHARACTERISTICS
The CharacteristicsLength parameter is incorrect for the NDIS version that is specified at the MajorNdisVersion member in the structure at MiniportDriverCharacteristics .
NDIS_STATUS_BAD_VERSION
The MajorNdisVersion or MinorNdisVersion specified in the characteristics structure is invalid.
NDIS_STATUS_RESOURCES
A shortage of resources, possibly memory, prevented NDIS from registering the caller.
NDIS_STATUS_FAILURE
This is a default error status, returned when none of the preceding errors caused the registration to fail.
Other NDIS_STATUS codes
An appropriate NDIS_STATUS code in the case of a failure.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Header dot11wdi.h
Library Ndis.lib
IRQL PASSIVE_LEVEL

See also

DRIVER_OBJECT

NDIS_MINIPORT_DRIVER_CHARACTERISTICS

NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS