RESOURCE_STATUS structure (resapi.h)
Contains information about a resource that is being brought online or taken offline. This structure is used as a parameter to the callback function SetResourceStatus.
Syntax
typedef struct RESOURCE_STATUS {
CLUSTER_RESOURCE_STATE ResourceState;
DWORD CheckPoint;
DWORD WaitHint;
HANDLE EventHandle;
} RESOURCE_STATUS, *PRESOURCE_STATUS;
Members
ResourceState
A value describing the state of a resource enumerated by the CLUSTER_RESOURCE_STATE enumeration. The possible values for this member are as follows:
ClusterResourceStateUnknown (-1)
An error occurred while trying to retrieve the state, typically because the server is no longer available. For more information, the caller should call the function GetLastError.
ClusterResourceOnline (2)
The resource is online and available.
ClusterResourceOffline (3)
The resource is offline and unavailable.
ClusterResourceFailed (4)
The resource has failed.
ClusterResourceOnlinePending (129)
The resource is in the process of being placed online. The CheckPoint member should be greater than the previous value of this member.
ClusterResourceOfflinePending (130)
The resource is in the process of being taken offline.
CheckPoint
A value set by the resource DLL to flag a status report as new.
WaitHint
This member is not being used at this time.
EventHandle
Handle to an event that indicates when the resource has failed.
Remarks
Resource DLLs typically set the ResourceState member to ClusterResourceOnline or ClusterResourceOffline. However, if ResourceState is set to ClusterResourceOnlinePending or ClusterResourceOfflinePending, the CheckPoint member should be greater than the previous value reported for CheckPoint.
Resource DLLs initially set CheckPoint to zero, then increment it by 1 for each call to SetResourceStatus. Resource Monitors detect new status reports by comparing the current value of CheckPoint to the previous value. If the value has changed, the Resource Monitor reads the new status information.
Before returning the ClusterResourceUnknown state in the ResourceState member, a resource DLL should call the function SetLastError.
Resource DLLs set the EventHandle member to a handle that is signaled when a resource fails.
For more information, see Implementing Resource DLLs.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Header | resapi.h |