OnlineClusterResourceEx function (clusapi.h)

Brings an offline or failed resource online.


DWORD OnlineClusterResourceEx(
  [in]           HRESOURCE hResource,
  [in]           DWORD     dwOnlineFlags,
  [in, optional] PBYTE     lpInBuffer,
  [in]           DWORD     cbInBufferSize


[in] hResource

The handle to the resource to bring online.

[in] dwOnlineFlags

A flag that specifies settings for the resource that is to be brought online.


The server is to ignore locked mode for the resource.


Do not update the persistent state of the resource.


The resource must be brought online to maintain a quorum.


The cluster service is to determine the node that will host the resource when it is brought online.

Windows Server 2012 R2 and Windows Server 2012:  This value is not supported before Windows Server 2016.


The server is not to ignore locked mode for the resource.

[in, optional] lpInBuffer

A pointer to the input buffer that receives instructions for the operation. The lpInBuffer parameter is formatted as a property list.

[in] cbInBufferSize

The size of lpInBuffer, in bytes.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code. The following is a possible error code.

Return code Description
The resource or one of the resources that it depends on has returned ERROR_IO_PENDING from its Online entry point function.


Minimum supported client None supported
Minimum supported server Windows Server 2012
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See also

Failover Cluster Resource Management Functions