ConvertInterfaceNameToLuidW (Compact 2013)
3/26/2014
This function converts a Unicode network interface name to the locally unique identifier (LUID) for the interface.
Syntax
NETIO_STATUS WINAPI ConvertInterfaceNameToLuidW(
__in const WCHAR* InterfaceName,
__out PNET_LUID InterfaceLuid
);
Parameters
- InterfaceName
A pointer to a NULL-terminated Unicode string that contains the network interface name.
- InterfaceLuid
A pointer to the NET_LUID for this interface.
Return Value
On success, ConvertInterfaceNameToLuidW returns NETIO_ERROR_SUCCESS. Any nonzero return value indicates failure.
Error code |
Meaning |
---|---|
ERROR_INVALID_NAME |
The interface name was invalid. This error is returned if the InterfaceName parameter contained an invalid name or the length of the InterfaceName parameter exceeded the maximum allowed string length for this parameter. |
ERROR_INVALID_PARAMETER |
One of the parameters was invalid. This error is returned if the InterfaceLuid parameter was NULL. |
Remarks
The ConvertInterfaceNameToLuidW function is protocol independent and works with network interfaces for both the IPv6 and IPv4 protocol. The ConvertInterfaceNameToLuidW converts a Unicode interface name to a LUID.
The ConvertInterfaceNameToLuidA converts an ANSI interface name to a LUID.
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.
See Also
Reference
IP Helper Functions
ConvertInterfaceAliasToLuid
ConvertInterfaceGuidToLuid
ConvertInterfaceIndexToLuid
ConvertInterfaceLuidToAlias
ConvertInterfaceLuidToGuid
ConvertInterfaceLuidToIndex
ConvertInterfaceLuidToNameA
ConvertInterfaceLuidToNameW
ConvertInterfaceNameToLuidA
if_indextoname
if_nametoindex
NET_LUID