Configuring Resources
Configuring a resource is the process of adjusting its properties, establishing its required dependencies, and making other changes so that it is ready to be brought online.
- Assign values to all of the resource's required private properties. (See Setting Properties.)
- Assign values to any of the resource's other private or common properties as necessary. For example, set any special failure or failover policies for the resource.
- If necessary, create registry and crypto checkpoints for the resource by calling ClusterResourceControl with the CLUSCTL_RESOURCE_ADD_CRYPTO_CHECKPOINT and CLUSCTL_RESOURCE_ADD_REGISTRY_CHECKPOINT control codes.
- Get the required dependencies of the resource by using the CLUSCTL_RESOURCE_GET_REQUIRED_DEPENDENCIES control code.
- If the resource has required dependencies, you must create and configure those resources as well. The dependencies may have required dependencies of their own. Create all the required resources and call AddClusterResourceDependency to establish each required dependency relationship.
- Create additional dependencies as desired.
- If the resource is a server application being published to clients through a failover cluster instance, use the service utility functions to initialize an appropriate service environment.
Example Code
The following sections contain examples of resource configuration: