OnlineV2 callback function

Marks a resource as available for use. The PONLINE_V2_ROUTINE type defines a pointer to this function.

Syntax


DWORD WINAPI OnlineV2(
  _In_     RESID    Resource,
  _Out_    LPHANDLE EventHandle,
  _In_     DWORD    OnlineFlags,
  _In_opt_ PBYTE    InBuffer,
  _In_     DWORD    InBufferSize,
  _In_     DWORD    Reserved
);

typedef DWORD (*PONLINE_V2_ROUTINE)(
    _In_     RESID    Resource,
    _Out_    LPHANDLE EventHandle,
    _In_     DWORD    OnlineFlags,
    _In_opt_ PBYTE    InBuffer,
    _In_     DWORD    InBufferSize,
    _In_     DWORD    Reserved
);

Parameters

Resource [in]

A resource identifier for the resource to be made available.

EventHandle [out]

On input, EventHandle is NULL. On output, EventHandle contains a handle to a non signaled synchronization object. The resource DLL can signal this handle at any time to report a resource failure to the Resource Monitor. EventHandle can also be set to NULL on output, which indicates that the resource does not support asynchronous event notifications.

OnlineFlags [in]

A bitmask of flags that specify settings for this operation. This parameter can be set to one or more of the following values:

CLUS_RESDLL_ONLINE_RECOVER_MONITOR_STATE (0x00000001)

Monitor the state of the resource if the resource is recovering from an error.

CLUS_RESDLL_ONLINE_IGNORE_RESOURCE_STATUS (0x00000002)

Perform the operation even if the resource indicates that it should be locked.

CLUS_RESDLL_ONLINE_RETURN_TO_SOURCE_NODE_ON_ERROR (0x00000004)

If the resource experiences an error, return it to the source node.

CLUS_RESDLL_ONLINE_RESTORE_ONLINE_STATE (0x00000008)

Set the status of the resource to online.

CLUS_RESDLL_ONLINE_IGNORE_NETWORK_CONNECTIVITY (0x00000010)

Perform the operation even if there is network error.

InBuffer [in, optional]

A pointer to a buffer that contains data for the operation; otherwise NULL if the operation does not require data.

InBufferSize [in]

The size of the InBuffer parameter, in bytes.

Reserved [in]

Reserved.

Return value

ERROR_SUCCESS

0

The operation was successful, and the resource is online.

ERROR_RESOURCE_NOT_AVAILABLE

5006 (0x138E)

The resource was arbitrated with some other systems, and one of the other systems won the arbitration. Only quorum-capable resources return this value.

ERROR_IO_PENDING

997 (0x3E5)

The request is pending, and a thread has been activated to process the online request.

If the operation was not successful for other reasons, a system error code is returned.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 R2

Header

ResApi.h

See also

Resource DLL Entry-Point Functions

 

 

Show: