FailClusterResource function (clusapi.h)

Initiates a resource failure. The PCLUSAPI_FAIL_CLUSTER_RESOURCE type defines a pointer to this function.

Syntax

DWORD FailClusterResource(
  [in] HRESOURCE hResource
);

Parameters

[in] hResource

Handle to the resource that is the target of the failure.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code.

Remarks

The resource identified by hResource is treated as inoperable, causing the cluster to initiate the same failover process that would result if the resource had actually failed. Applications call the FailClusterResource function to test their policies for restarting resources and groups.

Do not call FailClusterResource from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See also

OpenClusterResource