The ChangeClusterResourceGroup function moves a resource from one group to another.
DWORD WINAPI ChangeClusterResourceGroup(
HRESOURCE hResource,
HGROUP hGroup
);
If the operation was unsuccessful, ChangeClusterResourceGroup returns a Win32 error value.
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.