ConvertInterfaceLuidToGuid 函数

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

注意

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

语法

NETIOAPI_API ConvertInterfaceLuidToGuid(
  _In_  const NET_LUID *InterfaceLuid,
  _Out_       GUID     *InterfaceGuid
);

参数

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

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

返回值

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

返回代码 描述
STATUS_INVALID_PARAMETER

其中一个参数无效。 ConvertInterfaceLuidToGuid 如果 InterfaceLuidInterfaceGuid为 NULL,或者如果 InterfaceLuid 无效,则返回此错误。

言论

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

要求

目标平台

通用

版本

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

页眉

Netioapi.h (包括 Netioapi.h)

图书馆

Netio.lib

IRQL

PASSIVE_LEVEL

另请参阅

ConvertInterfaceAliasToLuid

ConvertInterfaceGuidToLuid

ConvertInterfaceIndexToLuid

ConvertInterfaceLuidToAlias

ConvertInterfaceLuidToIndex

ConvertInterfaceLuidToNameA

ConvertInterfaceLuidToNameW

ConvertInterfaceNameToLuidA

ConvertInterfaceNameToLuidW

NET_LUID