ConvertInterfaceGuidToLuid 函数

ConvertInterfaceGuidToLuid 函数将网络接口的全局唯一标识符(GUID)转换为接口的本地唯一标识符(LUID)。

注意

ConvertInterfaceXxx API 系列枚举绑定到 TCP/IP 的所有接口的标识符,这些接口可能包括虚拟微型端口、轻型筛选器、隧道适配器和物理接口。

语法

NETIOAPI_API ConvertInterfaceGuidToLuid(
  _In_  const GUID      *InterfaceGuid,
  _Out_       PNET_LUID InterfaceLuid
);

参数

  • InterfaceGuid [in]
    指向网络接口的 GUID 的指针。

  • InterfaceLuid [out]
    指向网络接口 NET_LUID 联合的指针。

返回值

ConvertInterfaceGuidToLuid 如果函数成功,则返回STATUS_SUCCESS。 如果函数失败,InterfaceLuid 参数设置为 NULLConvertInterfaceGuidToLuid 返回以下错误代码:

返回代码 描述
STATUS_INVALID_PARAMETER

其中一个参数无效。 ConvertInterfaceGuidToLuid 如果 InterfaceAliasInterfaceLuidNULL,或者 InterfaceGuid 无效,则返回此错误。

言论

ConvertInterfaceGuidToLuid 函数与协议无关,适用于 IPv6 和 IPv4 协议的网络接口。

要求

目标平台

通用

版本

在 Windows Vista 和更高版本的 Windows作系统中可用。

页眉

Netioapi.h (包括 Netioapi.h)

图书馆

Netio.lib

IRQL

PASSIVE_LEVEL

另请参阅

ConvertInterfaceAliasToLuid

ConvertInterfaceIndexToLuid

ConvertInterfaceLuidToAlias

ConvertInterfaceLuidToGuid

ConvertInterfaceLuidToIndex

ConvertInterfaceLuidToNameA

ConvertInterfaceLuidToNameW

ConvertInterfaceNameToLuidA

ConvertInterfaceNameToLuidW

NET_LUID