NdisMQueryAdapterInstanceName (Compact 2013)

3/26/2014

This function retrieves the friendly name of a miniport adapter.

Syntax

NDIS_STATUS NdisMQueryAdapterInstanceName(
  PNDIS_STRING AdapterInstanceName,
  NDIS_HANDLE MiniportAdapterHandle
);

Parameters

  • AdapterInstanceName
    [out] 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.
  • MiniportAdapterHandle
    [in] 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 network adapter or a virtual adapter. The miniport driver specifies the handle to such an interface in MiniportAdapterHandle. This handle to the interface is passed to the miniport driver's MiniportInitialize function to set up the interface 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 such as PCI Ethernet Adapter and Virtual Private Networking Adapter help the user quickly and accurately determine a physical network adapter or virtual adapter.

Requirements

Header

ndis.h

Library

ndis.dll

See Also

Reference

NDIS Functions for Miniport Drivers
MiniportInitialize
NdisFreeMemory