ChangeClusterResourceGroup

The ChangeClusterResourceGroup function moves a resource from one group to another.

DWORD WINAPI ChangeClusterResourceGroup(
  HRESOURCE hResource,  
  HGROUP hGroup         
);
 

Parameters

hResource
[in] Handle of the resource to be moved.
hGroup
[in] Handle of the group that should receive the resource identified by hResource.

Return Values

ERROR_SUCCESS
The operation was successful.

If the operation was unsuccessful, ChangeClusterResourceGroup returns a Win32 error value.

Remarks

Both the group that the resource currently belongs to and its new group must be owned by the same node regardless of the resource's state.

If the resource identified by hResource has dependencies, all of the resources in its dependency tree will be moved to the group identified by hGroup. That is, if Resource A depends on Resource B and Resource B depends on Resource C, a call to ChangeClusterResourceGroup with hResource representing either Resource A, Resource B, or Resource C will result in all three resources being moved.