OfflineClusterResource function (clusapi.h)

Takes a resource offline. The PCLUSAPI_OFFLINE_CLUSTER_RESOURCE type defines a pointer to this function.

Syntax

DWORD OfflineClusterResource(
  [in] HRESOURCE hResource
);

Parameters

[in] hResource

Handle to the resource to be taken offline.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns one of the following system error codes.

Return code Description
ERROR_IO_PENDING
The resource or one of the resources it depends on has returned ERROR_IO_PENDING from its Offline entry point function.
ERROR_RESOURCE_FAILED
This system error code is not returned.

Windows Server 2008 Datacenter and Windows Server 2008 Enterprise:  The function attempted to take offline a failed resource, so the failed resource has not been transitioned to an offline state.

Remarks

When calling OfflineClusterResource to offline a failed resource, it returns ERROR_SUCCESS instead of ERROR_RESOURCE_FAILED, and the resource will transition to the offline state.

Do not call OfflineClusterResource from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs.

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

See also

Offline

Online

OnlineClusterResource

OpenClusterResource