PSTARTUP_ROUTINE callback function (resapi.h)
Loads a resource DLL, returning a structure containing a function table and a version number. The PSTARTUP_ROUTINE type defines a pointer to this function.
Syntax
PSTARTUP_ROUTINE PstartupRoutine;
DWORD PstartupRoutine(
[in] LPCWSTR ResourceType,
[in] DWORD MinVersionSupported,
[in] DWORD MaxVersionSupported,
[in] PSET_RESOURCE_STATUS_ROUTINE SetResourceStatus,
[in] PLOG_EVENT_ROUTINE LogEvent,
[out] PCLRES_FUNCTION_TABLE *FunctionTable
)
{...}
Parameters
[in] ResourceType
Type of resource being started.
[in] MinVersionSupported
Minimum version of the Resource API supported by the Cluster service.
[in] MaxVersionSupported
Maximum version of the Resource API supported by the Cluster service.
[in] SetResourceStatus
Pointer to a callback function that the resource DLL should call to update its status after returning ERROR_IO_PENDING from Online or Offline. For more information see SetResourceStatus.
[in] LogEvent
Pointer to a callback function that the resource DLL should call to report events for the resource. For more information see LogEvent.
[out] FunctionTable
Pointer to a CLRES_FUNCTION_TABLE structure that describes the Resource API version and the specific names for the entry points.
Return value
Return code/value | Description |
---|---|
|
The request was successful. |
|
The resource DLL does not support a version that falls in the range identified by the MinVersionSupported and MaxVersionSupported parameters. |
If the operation was not successful, Startup should return one of the system error codes.
Remarks
The Startup entry-point function returns a function table that describes both the supported interface version of the Resource API and the entry points for all other functions required by the supported version of the Resource API.
At present, only Resource API version 1.0 is supported.
If your resource supports more than one version of the Resource API, return a function table for the latest version. The version number should be less than or equal to the MaxVersionSupported parameter. If the version of the function table pointed to by the FunctionTable parameter is not within range, your resource cannot be loaded successfully.
For more information see Implementing Startup.
Examples
See Implementing Startup.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 Enterprise, Windows Server 2008 Datacenter |
Target Platform | Windows |
Header | resapi.h |