NdisMQueryAdapterInstanceName function (ndis.h)

The NdisMQueryAdapterInstanceName function retrieves the friendly name of a miniport adapter.

Syntax

NDIS_STATUS NdisMQueryAdapterInstanceName(
  PNDIS_STRING pAdapterInstanceName,
  NDIS_HANDLE  MiniportHandle
);

Parameters

pAdapterInstanceName

A pointer to a caller-supplied NDIS_STRING type that receives a counted Unicode string. This string specifies the friendly name of the interface for the given miniport adapter. For Windows Vista and later versions of the Windows operating system, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

MiniportHandle

The handle to the miniport adapter that was previously input to the MiniportInitializeEx function.

Return value

Returns NDIS_STATUS_SUCCESS if memory for the string at AdapterInstanceName was successfully allocated; otherwise, it returns NDIS_STATUS_RESOURCES.

Remarks

A miniport driver uses NdisMQueryAdapterInstanceName to retrieve the friendly name of an interface that the miniport driver controls. This interface is either a physical NIC or a virtual adapter and is called a miniport adapter. The miniport driver specifies the handle to a miniport adapter in MiniportAdapterHandle . This handle to the miniport adapter is passed to the miniport driver's MiniportInitializeEx function to set up the miniport adapter for network I/O operations.

NdisMQueryAdapterInstanceName allocates memory for the string that specifies the friendly name. After the caller finishes using this memory, the caller must call the NdisFreeMemory function to release the memory.

Friendly names are intended to help the user quickly and accurately identify a physical NIC or virtual adapter--for example, "PCI Ethernet Adapter" and "Virtual Private Networking Adapter" are considered friendly names.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 5.1, and NDIS 6.0 and later. For NDIS 5.1 drivers, see NdisMQueryAdapterInstanceName (NDIS 5.1).
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Miniport_Driver_Function(ndis)

See also

MiniportInitializeEx

NdisFreeMemory

UNICODE_STRING