ChangeClusterResourceGroup function

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

Syntax


DWORD WINAPI ChangeClusterResourceGroup(
  _In_  HRESOURCE hResource,
  _In_  HGROUP hGroup
);

typedef DWORD (WINAPI *PCLUSAPI_CHANGE_CLUSTER_RESOURCE_GROUP)(
    _In_  HRESOURCE hResource,
    _In_  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 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) .

Aa367190.resmove(en-us,VS.85).png

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 Enterprise, Windows Server 2003 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

OpenCluster
OpenClusterGroup
OpenClusterResource

 

 

Show:
© 2014 Microsoft