Compartilhar via


NdisQueryAdapterInstanceName (Compact 2013)

3/26/2014

This function retrieves the friendly name of a physical network adapter 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 network adapter or a virtual adapter.
  • NdisBindingHandle
    [in] Specifies the handle that identifies the target network adapter or the virtual adapter of the next-lower driver to which the caller is bound.

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 network adapter or a virtual adapter to which the protocol is bound. The protocol driver specifies the handle to such a network adapter 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 network adapter or virtual adapter.

Requirements

Header

ndis.h

See Also

Reference

NDIS Functions for Protocol Drivers
NdisFreeMemory