The IsAlive entry point function determines if a resource is available for use.
BOOL WINAPI IsAlive(
RESID ResourceId
);
Unlike LooksAlive, which determines whether a resource appears to be available, IsAlive determines whether the resource is in fact available. The set of procedures that you need to implement to determine availability depends on your resource. You can implement a simple procedure as Cluster Server does in its resource DLL for the Generic Application resource, which determines only if the application is running. Most likely you will want to do more, such as determining if data can be read or written and checking for a particular state.
Make your implementation of IsAlive take 50 milliseconds or less to complete if at all possible. At the very most, you should not allow IsAlive to block processing for more than 300 milliseconds. However, if your implementation must take longer than 300 milliseconds:
Call the Win32 function SetLastError just before returning.
In Cluster Server's File Share resource DLL, IsAlive uses the resource identifier in ResourceId as an index into a resource table that keeps track of all of the resources that are handled by the DLL. IsAlive retrieves the address of the resource structure and then makes a call to the Win32 function NetShareGetInfo to thoroughly check if the resource is alive.
Version: Use Windows NT Server Enterprise Edition 4.0.
Windows CE: Unsupported.
Header: Declared in resapi.h.