Expand Minimize

ConvertInterfaceIndexToLuid function

The ConvertInterfaceIndexToLuid function converts a local index for a network interface to the locally unique identifier (LUID) for the interface.

Syntax


NETIO_STATUS WINAPI ConvertInterfaceIndexToLuid(
  _In_   NET_IFINDEX InterfaceIndex,
  _Out_  PNET_LUID InterfaceLuid
);

Parameters

InterfaceIndex [in]

The local index value for a network interface.

InterfaceLuid [out]

A pointer to the NET_LUID for this interface.

Return value

On success, ConvertInterfaceIndexToLuid returns NO_ERROR. Any nonzero return value indicates failure and a NULL is returned in the InterfaceLuid parameter.

Error codeMeaning
ERROR_FILE_NOT_FOUND

The system cannot find the file specified. This error is returned if the network interface specified by the InterfaceIndex parameter was not a value on the local machine.

ERROR_INVALID_PARAMETER

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

 

Remarks

The ConvertInterfaceIndexToLuid function is available on Windows Vista and later.

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

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
ConvertInterfaceLuidToAlias
ConvertInterfaceLuidToGuid
ConvertInterfaceLuidToIndex
ConvertInterfaceLuidToNameA
ConvertInterfaceLuidToNameW
ConvertInterfaceNameToLuidA
ConvertInterfaceNameToLuidW
if_indextoname
if_nametoindex
NET_LUID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft