Share via


NdisQueryAdapterInstanceName (Windows Embedded CE 6.0)

1/6/2010

This function retrieves the friendly name of a physical NIC or a virtual adapter to which the calling protocol is bound.

Syntax

NDIS_STATUS NdisQueryAdapterInstanceName(
  PNDIS_STRING AdapterInstanceName,
  NDIS_HANDLE NdisBindingHandle
);

Parameters

  • AdapterInstanceName
    [out] Points to a caller-supplied variable that receives a counted Unicode string. This string specifies the friendly name of the interface to which the binding refers. This interface is either a physical NIC or a virtual adapter.
  • NdisBindingHandle
    [in] Specifies the handle that identifies the target NIC or the virtual adapter of the next-lower driver to which the caller is bound. Typically, NdisBindingHandle was returned by the NdisOpenAdapter function.

Return Value

The following table shows the return values for this function.

Value Description

NDIS_STATUS_SUCCESS

If memory for the string at AdapterInstanceName was successfully allocated.

NDIS_STATUS_RESOURCES

Default return value.

Remarks

A protocol driver uses NdisQueryAdapterInstanceName to retrieve the friendly name of a physical NIC or a virtual adapter to which the protocol is bound. The protocol driver specifies the handle to such a NIC or virtual adapter in NdisBindingHandle. The protocol driver can call NdisOpenAdapter to retrieve this handle.

NdisQueryAdapterInstanceName 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 or Virtual Private Networking Adapter help the user quickly and accurately identify a physical NIC or virtual adapter.

Requirements

Header ndis.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisFreeMemory
NdisOpenAdapter