ConvertInterfaceLuidToNameA - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netioapi.h

NETIOAPI_API ConvertInterfaceLuidToNameA(
  _In_  const NET_LUID *InterfaceLuid,
  _Out_       PSTR     InterfaceName,
  _In_        SIZE_T   Length
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (convertinterfaceluidtonamea)

ConvertInterfaceLuidToNameA function

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

[!NOTE] The ConvertInterfaceXxx API family enumerates identifiers over all interfaces bound to TCP/IP, which may include virtual miniports, lightweight filters, tunnel adapters, and physical interfaces.

Parameters

Return value

ConvertInterfaceLuidToNameA returns STATUS_SUCCESS if the function succeeds. If the function fails, ConvertInterfaceLuidToNameA returns one of the following error codes:

Return code Description
STATUS_INVALID_PARAMETER One of the parameters is invalid. ConvertInterfaceLuidToNameA returns this error if either InterfaceLuid or InterfaceName is NULL, or if InterfaceLuid is invalid.
STATUS_NOT_ENOUGH_MEMORY ConvertInterfaceLuidToNameA returns this error if the InterfaceName buffer was not as large as specified in the Length parameter and, therefore, the buffer could not hold the interface name.

Remarks

The ConvertInterfaceLuidToNameA function is protocol-independent and works with network interfaces for both the IPv6 and IPv4 protocols.

The maximum length of the name for a network interface, NDIS_IF_MAX_STRING_SIZE, without the terminating NULL character, is defined in the Ntddndis.h header file. NDIS_IF_MAX_STRING_SIZE is defined to be the IF_MAX_STRING_SIZE constant, which is defined in the Ifdef.h header file.

[!NOTE] The Ntddndis.h and Ifdef.h header files are automatically included in the Netioapi.h header file. You should never use the Ntddndis.h and Ifdef.h header files directly.

Use the ConvertInterfaceLuidToNameW function to convert a network interface LUID to a Unicode interface name.

Requirements

Target platform Universal
Version Available in Windows Vista and later versions of the Windows operating systems.
Header Netioapi.h (include Netioapi.h)
Library Netio.lib
IRQL PASSIVE_LEVEL

See also

ConvertInterfaceAliasToLuid

ConvertInterfaceGuidToLuid

ConvertInterfaceIndexToLuid

ConvertInterfaceLuidToAlias

ConvertInterfaceLuidToGuid

ConvertInterfaceLuidToIndex

ConvertInterfaceLuidToNameW

ConvertInterfaceNameToLuidA

ConvertInterfaceNameToLuidW

NET_LUID