Online callback function
Marks a resource as available for use. The PONLINE_ROUTINE type defines a pointer to this function.
DWORD WINAPI Online( _In_ RESID Resource, _Inout_ LPHANDLE EventHandle ); typedef DWORD (*PONLINE_ROUTINE)( _In_ RESID Resource, _Inout_ LPHANDLE EventHandle );
- Resource [in]
Resource identifier for the resource to be made available.
- EventHandle [in, out]
On input, EventHandle is NULL. On output, EventHandle contains a handle to a nonsignaled 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, indicating that the resource does not support asynchronous event notification.
The operation was successful, and the resource is now online.
The resource was arbitrated with some other systems, and one of the other systems won the arbitration. Only quorum-capable resources return this value.
The request is pending, and a thread has been activated to process the online request.
If the operation was not successful for other reasons, Online should return one of the system error codes.
If the Online entry-point function returns an error code other than ERROR_IO_PENDING, the Resource Monitor logs an event and calls Terminate.
Returning a valid EventHandle yields the following benefits:
- The Resource Monitor will not perform LooksAlive polling. Avoiding this overhead is often useful, particularly when your DLL supports multiple resource instances.
- You can report resource failure at any time by signaling the handle. The Resource Monitor will immediately call IsAlive to verify that the resource has failed.
For effective implementation strategies of the Online entry-point function, see Implementing Online.
Minimum supported client
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter