The CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES control code is used to request a list of all required dependencies for a resource type.
Type: | External |
Access: | CLUS_ACCESS_READ |
Input: | None |
Output: | Value list |
Global: | CLUS_NOT_GLOBAL |
Modify: | CLUS_NO_MODIFY |
Code: | CLCTL_GET_REQUIRED_DEPENDENCIES |
ClusterResourceTypeControl returns a value list when you pass CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES that indicates the resources upon which the specific resource type depends. For example, if you request the required dependencies for a Print Spooler resource, it will typically return two entries in its value list: an entry for a storage device resource such as a Physical Disk and a Network Name resource.
All of the entries in the value list except the final one are CLUSPROP_REQUIRED_DEPENDENCY structures. This structure describes dependencies using either a resource class or a resource type. When you are parsing the value list, use the Value member of each entry to determine whether the dependency is being described as a resource class or type. The final entry contains only the CLUSPROP_SYNTAX_ENDMARK value.
If your resources have required dependencies, you must support the CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES control code in your ResourceTypeControl entry point function. Return a value list that is terminated with the CLUSPROP_SYNTAX value CLUSPROP_SYNTAX_ENDMARK. The other entries should include a CLUSPROP_REQUIRED_DEPENDENCY union. This union describes a dependency in one of three ways:
Resource class is a numeric value that identifies resources of similar capability. For example, CLUS_RESCLASS_STORAGE identifies resources that are capable of storing data. Third-party developers can create their own resource classes; user-defined classes are identified with the CLUS_RESCLASS_USER storage class.
In the example described in the Notes to Callers section, a Print Spooler resource has required dependencies on a storage class device and a Network Name resource. You would return a value list with two entries preceding the final one: one entry with the ResClass member of the CLUSPROP_REQUIRED_DEPENDENCY structure set to CLUS_RESCLASS_STORAGE and a second entry with the ResTypeName member set to "Network Name."