PCLUSAPI_CHANGE_CLUSTER_RESOURCE_GROUP callback function

Moves a resource from one group to another. The PCLUSAPI_CHANGE_CLUSTER_RESOURCE_GROUP type defines a pointer to this function.

Syntax

PCLUSAPI_CHANGE_CLUSTER_RESOURCE_GROUP PclusapiChangeClusterResourceGroup;

DWORD PclusapiChangeClusterResourceGroup(
  HRESOURCE hResource,
  HGROUP hGroup
)
{...}

Parameters

hResource

Handle of the resource to be moved.

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

   
Windows version None supported Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h

See Also

OpenCluster

OpenClusterGroup

OpenClusterResource