ConvertInterfaceLuidToIndex function (netioapi.h)
The ConvertInterfaceLuidToIndex function converts a locally unique identifier (LUID) for a network interface to the local index for the interface.
Syntax
IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API ConvertInterfaceLuidToIndex(
[in] const NET_LUID *InterfaceLuid,
[out] PNET_IFINDEX InterfaceIndex
);
Parameters
[in] InterfaceLuid
A pointer to a NET_LUID for a network interface.
[out] InterfaceIndex
The local index value for the interface.
Return value
On success, ConvertInterfaceLuidToIndex returns NO_ERROR. Any nonzero return value indicates failure and a NET_IFINDEX_UNSPECIFIED is returned in the InterfaceIndex parameter.
Error code | Meaning |
---|---|
|
One of the parameters was invalid. This error is returned if either the InterfaceLuid or InterfaceIndex parameter was NULL or if the InterfaceLuid parameter was invalid. |
Remarks
The ConvertInterfaceLuidToIndex function is available on Windows Vista and later.
The ConvertInterfaceLuidToIndex function is protocol independent and works with network interfaces for both the IPv6 and IPv4 protocol.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | netioapi.h (include Iphlpapi.h) |
Library | Iphlpapi.lib |
DLL | Iphlpapi.dll |