The ResourceTypeControl entry point function performs an operation that applies to a resource type.
DWORD WINAPI ResourceTypeControl(
LPCWSTR ResourceTypeName,
DWORD ControlCode,
LPVOID InBuffer,
DWORD InBufferSize,
LPVOID OutBuffer,
DWORD OutBufferSize,
LPDWORD BytesReturned
);
If the operation was unsuccessful, ResourceTypeControl should return a Win32 error value.
ResourceTypeControl should be implemented by all resource DLLs. However, it is not necessary to provide code to handle all of the control codes that are defined for resource types. As a minimum, you should support the following control codes that manipulate private properties:
If your resource type has required dependencies, you must support CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES.
If your resource type needs to replicate a portion of the system registry, you must support CLUSCTL_RESOURCE_TYPE_GET_REGISTRY_CHECKPOINTS.
Support for any of the other control codes is optional. To determine how and why to support a particular control code, see its reference entry in the documentation. It is preferable not to provide support for some of the codes because they depend on the standard processing that the Resource Monitor supplies. In particular, do not include support for CLUSCTL_RESOURCE_TYPE_GET_CHARACTERISTICS because it is important not to override the processing provided by the Resource Monitor.
To request that the Resource Monitor process a control code, return ERROR_INVALID_FUNCTION. You can return this value for a control code regardless of whether you include support for the code in ResourceTypeControl. Some resource DLLs support a control code to augment the functionality that the Resource Monitor supplies.
If at all possible, make your implementation of ResourceTypeControl finish in less than 300 milliseconds.
Version: Use Windows NT Server Enterprise Edition 4.0.
Windows CE: Unsupported.
Header: Declared in resapi.h.