GetClusterNetInterfaceState 函数 (clusapi.h)

返回 网络接口的当前状态。 PCLUSAPI_GET_CLUSTER_NET_INTERFACE_STATE类型定义指向此函数的指针。

语法

CLUSTER_NETINTERFACE_STATE GetClusterNetInterfaceState(
  [in] HNETINTERFACE hNetInterface
);

参数

[in] hNetInterface

应为其返回状态信息的网络接口的句柄。

返回值

GetClusterNetInterfaceState 返回网络接口的当前状态,该状态由 CLUSTER_NETINTERFACE_STATE 枚举枚举的下列值之一表示。

返回代码/值 说明
ClusterNetInterfaceFailed
1
网络接口无法与任何其他网络接口通信。
ClusterNetInterfaceUnreachable
2
网络接口无法与状态不是 ClusterNetInterfaceFailedClusterNetInterfaceUnavailable 的其他至少一个网络接口通信。
ClusterNetInterfaceUp
3
网络接口可以与状态不是 ClusterNetInterfaceFailedClusterNetInterfaceUnavailable 的所有其他网络接口通信。
ClusterNetInterfaceUnavailable
0
拥有网络接口的节点已关闭。
ClusterNetInterfaceStateUnknown
-1
操作未成功。 有关错误的详细信息,请调用函数 GetLastError

要求

   
最低受支持的客户端 无受支持的版本
最低受支持的服务器 Windows Server 2008 企业版、Windows Server 2008 Datacenter
目标平台 Windows
标头 clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

另请参阅

CLUSTER_NETINTERFACE_STATE

OpenClusterNetInterface

ClusNetInterface 对象的 State 属性