ConvertInterfaceGuidToLuid function
The ConvertInterfaceGuidToLuid function converts a globally unique identifier (GUID) for a network interface to the locally unique identifier (LUID) for the interface.
Note
The ConvertInterfaceXxx API family enumerates identifiers over all interfaces bound to TCP/IP, which may include virtual miniports, lightweight filters, tunnel adapters, and physical interfaces.
Syntax
NETIOAPI_API ConvertInterfaceGuidToLuid(
_In_ const GUID *InterfaceGuid,
_Out_ PNET_LUID InterfaceLuid
);
Parameters
InterfaceGuid [in]
A pointer to a GUID for the network interface.InterfaceLuid [out]
A pointer to the NET_LUID union for the network interface.
Return value
ConvertInterfaceGuidToLuid returns STATUS_SUCCESS if the function succeeds. If the function fails, the InterfaceLuid parameter is set to NULL, and ConvertInterfaceGuidToLuid returns the following error code:
Return code | Description |
---|---|
STATUS_INVALID_PARAMETER | One of the parameters was invalid. ConvertInterfaceGuidToLuid returns this error if either InterfaceAlias or InterfaceLuid is NULL, or if InterfaceGuid is invalid. |
Remarks
The ConvertInterfaceGuidToLuid function is protocol-independent and works with network interfaces for both the IPv6 and IPv4 protocols.
Requirements
Target platform |
Universal |
Version |
Available in Windows Vista and later versions of the Windows operating systems. |
Header |
Netioapi.h (include Netioapi.h) |
Library |
Netio.lib |
IRQL |
PASSIVE_LEVEL |