DestroyCluster function (clusapi.h)

Removes a cluster. The PCLUSAPI_DESTROY_CLUSTER type defines a pointer to this function.

Syntax

DWORD DestroyCluster(
  [in]           HCLUSTER                         hCluster,
  [in, optional] PCLUSTER_SETUP_PROGRESS_CALLBACK pfnProgressCallback,
  [in, optional] PVOID                            pvCallbackArg,
  [in]           BOOL                             fdeleteVirtualComputerObjects
);

Parameters

[in] hCluster

Handle to a cluster, returned by the OpenCluster or CreateCluster function.

[in, optional] pfnProgressCallback

Address of callback function that matches the PCLUSTER_SETUP_PROGRESS_CALLBACK function pointer that will be called periodically to provide progress on the cluster destruction.

[in, optional] pvCallbackArg

Argument for the callback function.

[in] fdeleteVirtualComputerObjects

If TRUE, then delete the virtual computer objects associated with the cluster from the directory.

Return value

Returns ERROR_SUCCESS if the cluster was completely removed or a system error code for the last failed operation.

Remarks

It is possible for multiple steps to fail when removing a cluster with DestroyCluster, but only one error code can be returned. The cluster error log should be reviewed if an error is returned.

Requirements

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

See also

Cluster Management Functions

CreateCluster

OpenCluster