Export (0) Print
Expand All
Expand Minimize

ConvertInterfaceLuidToNameA function

The ConvertInterfaceLuidToNameA function converts a locally unique identifier (LUID) for a network interface to the ANSI interface name.

Syntax


NETIO_STATUS WINAPI ConvertInterfaceLuidToNameA(
  _In_   const NET_LUID *InterfaceLuid,
  _Out_  PSTR InterfaceName,
  _In_   SIZE_T Length
);

Parameters

InterfaceLuid [in]

A pointer to a NET_LUID for a network interface.

InterfaceName [out]

A pointer to a buffer to hold the NULL-terminated ANSI string containing the interface name when the function returns successfully.

Length [in]

The length, in bytes, of the buffer pointed to by the InterfaceName parameter. This value must be large enough to accommodate the interface name and the terminating null character. The maximum required length is NDIS_IF_MAX_STRING_SIZE + 1.

Return value

On success, ConvertInterfaceLuidToNameA returns NETIO_ERROR_SUCCESS. Any nonzero return value indicates failure.

Error codeMeaning
ERROR_INVALID_PARAMETER

One of the parameters was invalid. This error is returned if either the InterfaceLuid or the InterfaceName parameter was NULL or if the InterfaceLuid parameter was invalid.

ERROR_NOT_ENOUGH_MEMORY

Not enough storage is available to process this command. This error is returned if the size of the buffer pointed to by InterfaceName parameter was not large enough as specified in the Length parameter to hold the interface name.

 

Remarks

The ConvertInterfaceLuidToNameA function is available on Windows Vista and later.

The ConvertInterfaceLuidToNameA function is protocol independent and works with network interfaces for both the IPv6 and IPv4 protocol. The ConvertInterfaceLuidToNameA converts a network interface LUID to an ANSI interface name.

The ConvertInterfaceLuidToNameW converts a network interface LUID to a Unicode interface name.

The maximum length of an interface name, NDIS_IF_MAX_STRING_SIZE, without the terminating NULL is declared in the Ntddndis.h header file. The NDIS_IF_MAX_STRING_SIZE is defined to be the IF_MAX_STRING_SIZE constant defined in the Ifdef.h header file. The Ntddndis.h and Ifdef.h header files are automatically included in the Netioapi.h header file which is automatically included by the Iphlpapi.h header file. The Ntddndis.h, Ifdef.h, and Netioapi.h header files should never be used directly.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netioapi.h (include Iphlpapi.h)

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

ConvertInterfaceAliasToLuid
ConvertInterfaceGuidToLuid
ConvertInterfaceIndexToLuid
ConvertInterfaceLuidToAlias
ConvertInterfaceLuidToGuid
ConvertInterfaceLuidToIndex
ConvertInterfaceLuidToNameW
ConvertInterfaceNameToLuidA
ConvertInterfaceNameToLuidW
if_indextoname
if_nametoindex
NET_LUID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft