PCLUSAPI_GET_CLUSTER_FROM_NETWORK callback function

Returns a handle to the cluster associated with a network. The PCLUSAPI_GET_CLUSTER_FROM_NETWORK type defines a pointer to this function.

Syntax

PCLUSAPI_GET_CLUSTER_FROM_NETWORK PclusapiGetClusterFromNetwork;

HCLUSTER PclusapiGetClusterFromNetwork(
  HNETWORK hNetwork
)
{...}

Parameters

hNetwork

Handle to the network.

Return Value

If the operation succeeds, the function returns a handle to the cluster that owns the network.

If the operation fails, the function returns NULL. For more information about the error, call GetLastError.

Remarks

For hNetwork to be a valid handle, there must necessarily be an open cluster handle (see OpenClusterNetwork). GetClusterFromNetwork returns another instance of the handle from which hNetwork was obtained.

Be sure to call CloseCluster on the handle returned from GetClusterFromNetwork before the handle goes out of scope. Closing this handle does not invalidate hNetwork or the cluster handle from which hNetwork was obtained.

Requirements

   
Windows version None supported Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h

See Also

CloseCluster

CloseClusterNetwork

GetClusterFromGroup

GetClusterFromNetInterface

GetClusterFromNode

GetClusterFromResource

OpenCluster

OpenClusterNetwork