DeleteClusterResource function (clusapi.h)

Removes an offline resource from a cluster. The PCLUSAPI_DELETE_CLUSTER_RESOURCE type defines a pointer to this function.

Syntax

DWORD DeleteClusterResource(
  [in] HRESOURCE hResource
);

Parameters

[in] hResource

Handle to an offline resource. You must close this handle separately.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code, such as one of these values.

Return code Description
ERROR_RESOURCE_ONLINE
Windows Server 2008 R2: The resource identified by hResource is not offline currently.
ERROR_INVALID_STATE
Windows Server 2012: The resource identified by hResource is not offline currently.

Remarks

DeleteClusterResource does not close the resource handle specified by hResource. To avoid memory leaks, be sure to close this handle with CloseClusterResource.

Do not call DeleteClusterResource 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

CloseClusterResource

CreateClusterResource

OpenClusterResource