ChangeClusterResourceGroup function (clusapi.h)
Moves a resource from one group to another. The PCLUSAPI_CHANGE_CLUSTER_RESOURCE_GROUP type defines a pointer to this function.
Syntax
DWORD ChangeClusterResourceGroup(
[in] HRESOURCE hResource,
[in] HGROUP hGroup
);
Parameters
[in] hResource
Handle of the resource to be moved.
[in] hGroup
Handle of the group that should receive the resource identified by hResource.
Return value
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, it returns one of the system error codes.
Remarks
With the ChangeClusterResourceGroup function, both the group that a resource currently belongs to and its new group must be owned by the same node regardless of the resource's state.
Do not call ChangeClusterResourceGroup from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs. If the resource identified by hResource has dependencies, all of the resources in its dependency tree are moved to the group identified by hGroup. For example, in the situation shown in the following diagram, changing resource B to group 2 will move the entire dependency tree (resources A, X, and Y) .
Do not pass LPC and RPC handles to the same function call. Otherwise, the call will raise an RPC exception and can have additional destructive effects. For information on how LPC and RPC handles are created, see Using Object Handles and OpenCluster.
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 |