GetClusterFromResource function

Returns a handle to the cluster associated with a resource. The PCLUSAPI_GET_CLUSTER_FROM_RESOURCE type defines a pointer to this function.

Syntax


HCLUSTER WINAPI GetClusterFromResource(
  _In_ HRESOURCE hResource
);

typedef HCLUSTER (WINAPI *PCLUSAPI_GET_CLUSTER_FROM_RESOURCE)(
    _In_ HRESOURCE hResource
);

Parameters

hResource [in]

Handle to the resource.

Return value

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

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

Remarks

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

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

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

GetClusterFromGroup
GetClusterFromNetwork
GetClusterFromNetInterface
GetClusterFromNode
CloseCluster
OpenCluster
OpenClusterResource
CloseClusterResource

 

 

Show: