PRESOURCE_CONTROL_ROUTINE callback function (resapi.h)
Performs an operation that applies to a resource. The PRESOURCE_CONTROL_ROUTINE type defines a pointer to this function.
Syntax
PRESOURCE_CONTROL_ROUTINE PresourceControlRoutine;
DWORD PresourceControlRoutine(
[in] RESID Resource,
[in] DWORD ControlCode,
[in, optional] PVOID InBuffer,
[in] DWORD InBufferSize,
[out, optional] PVOID OutBuffer,
[in] DWORD OutBufferSize,
[out] LPDWORD BytesReturned
)
{...}
Parameters
[in] Resource
Resource identifier of the affected resource.
[in] ControlCode
Control code that represents the operation to be performed. For a list of valid values for the ControlCode parameter, see Resource Type Control Codes.
[in, optional] InBuffer
Pointer to a buffer containing data to be used in the operation. InBuffer can be NULL if no data is required.
[in] InBufferSize
Size, in bytes, of the buffer pointed to by InBuffer.
[out, optional] OutBuffer
Pointer to a buffer containing data resulting from the operation. OutBuffer can be NULL if the operation does not need to return data.
[in] OutBufferSize
Size, in bytes, of the available space pointed to by OutBuffer.
[out] BytesReturned
Actual size, in bytes, of the data resulting from the operation.
Return value
Return code/value | Description |
---|---|
|
The operation associated with ControlCode was completed successfully. |
|
The resource DLL requested that the Resource Monitor perform default processing (if any) for ControlCode in addition to processing supplied by the DLL (if any). |
|
The allocated size of OutBuffer was too small to hold the requested data. BytesReturned indicates the required size. Always include the terminating NULL when calculating the byte sizes of strings. |
|
Indicates that new property values for a resource have been set in the cluster database, but the properties have not yet taken effect. The new property values will be applied after the resource is taken offline and brought online. |
The operation was unsuccessful. |
Remarks
Some control codes should be handled by the resource DLL, while others should be left to the Resource Monitor. For effective implementation strategies of the ResourceControl entry-point function, see Implementing ResourceControl.
Examples
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 |