ConvertInterfaceLuidToAlias (NETIOAPI) (Compact 7)
3/12/2014
This function converts a locally unique identifier (LUID) for a network interface to an interface alias.
Syntax
NETIOAPI_API
ConvertInterfaceLuidToAlias(
IN const NET_LUID* InterfaceLuid,
__out_ecount(Length) PWSTR InterfaceAlias,
__in SIZE_T Length
);
Parameters
- InterfaceLuid
A pointer to a NET_LUID structure for the network interface.
- InterfaceAlias
A pointer to a buffer to hold the NULL-terminated Unicode string. If ConvertInterfaceLuidToAlias returns successfully, InterfaceAlias contains the alias name of the network interface.
- Length
The length, in bytes, of the buffer that the InterfaceAlias parameter points to. This value must be large enough to hold the alias name of the network interface and the terminating NULL character. The maximum allowed length is NDIS_IF_MAX_STRING_SIZE + 1. For more information about NDIS_IF_MAX_STRING_SIZE, see the following Remarks section.
Return Value
ConvertInterfaceLuidToAlias returns STATUS_SUCCESS if the function succeeds. If the function fails, ConvertInterfaceLuidToAlias returns one of the following error codes:
Error Code | Meaning |
---|---|
STATUS_INVALID_PARAMETER |
One of the parameters is invalid. ConvertInterfaceLuidToAlias returns this error if either InterfaceLuid or InterfaceAlias is NULL, or if InterfaceLuid is invalid. |
STATUS_NOT_ENOUGH_MEMORY |
Not enough storage is available. ConvertInterfaceLuidToAlias returns this error if the size of the buffer that the InterfaceAlias parameter points to was not as large as specified in the Length parameter. Therefore, the buffer could not hold the alias name. |
Remarks
The ConvertInterfaceLuidToAlias function is protocol-independent and works with network interfaces for both the IPv6 and IPv4 protocols.
The maximum length of the alias name for a network interface, NDIS_IF_MAX_STRING_SIZE, without the terminating NULL character, is declared 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. 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.
See Also
Reference
IP Helper Kernel-Mode Functions
ConvertInterfaceAliasToLuid (NETIOAPI)
ConvertInterfaceGuidToLuid (NETIOAPI)
ConvertInterfaceIndexToLuid (NETIOAPI)
ConvertInterfaceLuidToIndex (NETIOAPI)
ConvertInterfaceLuidToNameA (NETIOAPI)
ConvertInterfaceLuidToNameW (NETIOAPI)
ConvertInterfaceNameToLuidA (NETIOAPI)
ConvertInterfaceNameToLuidW (NETIOAPI)
NET_LUID