ConvertInterfaceAliasToLuid 函数

ConvertInterfaceAliasToLuid 函数将网络接口的接口别名转换为接口的本地唯一标识符(LUID)。

注意

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

语法

NETIOAPI_API ConvertInterfaceAliasToLuid(
  _In_  const WCHAR     *InterfaceAlias,
  _Out_       PNET_LUID InterfaceLuid
);

参数

  • InterfaceAlias [in]
    指向 NULL 终止的 Unicode 字符串的指针,该字符串包含网络接口的别名。

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

返回值

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

返回代码 描述
STATUS_INVALID_PARAMETER

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

言论

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

要求

目标平台

通用

版本

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

页眉

Netioapi.h (包括 Netioapi.h)

图书馆

Netio.lib

IRQL

PASSIVE_LEVEL

另请参阅

ConvertInterfaceGuidToLuid

ConvertInterfaceIndexToLuid

ConvertInterfaceLuidToAlias

ConvertInterfaceLuidToGuid

ConvertInterfaceLuidToIndex

ConvertInterfaceLuidToNameA

ConvertInterfaceLuidToNameW

ConvertInterfaceNameToLuidA

ConvertInterfaceNameToLuidW

NET_LUID