ConvertInterfaceAliasToLuid function (netioapi.h)
The ConvertInterfaceAliasToLuid function converts an interface alias name for a network interface to the locally unique identifier (LUID) for the interface.
Syntax
IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API ConvertInterfaceAliasToLuid(
[in] const WCHAR *InterfaceAlias,
[out] PNET_LUID InterfaceLuid
);
Parameters
[in] InterfaceAlias
A pointer to a NULL-terminated Unicode string containing the alias name of the network interface.
[out] InterfaceLuid
A pointer to the NET_LUID for this interface.
Return value
On success, ConvertInterfaceAliasToLuid returns NO_ERROR. Any nonzero return value indicates failure and a NULL is returned in the InterfaceLuid parameter.
Error code | Meaning |
---|---|
|
One of the parameters was invalid. This error is returned if either the InterfaceAlias or InterfaceLuid parameter was NULL or if the InterfaceAlias parameter was invalid. |
Remarks
The ConvertInterfaceAliasToLuid function is available on Windows Vista and later.
The ConvertInterfaceAliasToLuid 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 |