Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Performs an operation that applies to a resource type. The PRESOURCE_TYPE_CONTROL_ROUTINE type defines a pointer to this function.
Syntax
PRESOURCE_TYPE_CONTROL_ROUTINE PresourceTypeControlRoutine;
DWORD PresourceTypeControlRoutine(
[in] LPCWSTR ResourceTypeName,
[in] DWORD ControlCode,
[in] PVOID InBuffer,
[in] DWORD InBufferSize,
[out] PVOID OutBuffer,
[in] DWORD OutBufferSize,
[out] LPDWORD BytesReturned
)
{...}
Parameters
[in] ResourceTypeName
Type of resource to be affected by the operation.
[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] InBuffer
Pointer to a buffer containing data to be used in the operation. InBuffer can be NULL if the operation does not require data.
[in] InBufferSize
Size, in bytes, of the buffer pointed to by InBuffer.
[out] OutBuffer
Pointer to a buffer containing data resulting from the operation. OutBuffer can be NULL if the operation returns no data.
[in] OutBufferSize
Size, in bytes, of the available space pointed to by OutBuffer.
[out] BytesReturned
Number of bytes in the buffer pointed to by OutBuffer that actually contain data.
Return value
If the operation succeeds, the function returns ERROR_SUCCESS.
If the operation fails, the function returns a system error code. The following is a possible error code.
| Return code | Description |
|---|---|
|
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). |
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 ResourceTypeControl entry-point function, see Implementing ResourceTypeControl.
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 |