Cluster control codes are 32-bit values used to describe an operation on a resource, resource type, group, or node. Control codes consist of the following seven components:
The 8-bit object component indicates the type of cluster object to which the control code applies. This component can be set to one of the following values:
All of the values except CLUS_OBJECT_USER represent object types defined by Microsoft® Cluster Server. Third-party developers can define control codes for their own object types by setting the object component to a value greater than CLUS_OBJECT_USER.
The bit marked G indicates whether or not the control code represents a global operation which must be performed on each cluster node. Valid values for this component are CLUS_NOT_GLOBAL and CLUS_GLOBAL. Currently, CLUSCTL_RESOURCE_TYPE_STORAGE_GET_AVAILABLE_DISKS is the only global control code.
The bit marked M indicates whether or not the control code causes a modification to data which in turn may generate an event notification. Valid values for this component are CLUS_NO_MODIFY and CLUS_MODIFY.
The bit marked U indicates whether or not the control code is a user code defined by a third-party developer for use by his or her resource DLL. A control code defined by a user such as a third-party developer sets this bit; a control code defined by Cluster Server does not.
Cluster Server control codes are categorized as either internal or external, as indicated by the bit marked I. Internal control codes set this bit and external control codes do not. An internal control code can be used only by the Cluster Service, meaning that applications cannot pass internal control codes as parameters to the control functions of the Cluster API. Internal control codes are typically sent by the Cluster Service to notify a resource or resource type of an event. It is the external control codes that applications use to initiate an operation.
The 18-bit operation code describes the operation. All operation codes are defined as constants beginning with the prefix CLCTL. Some of the operation codes are applicable only to one type of object; others apply to multiple objects. For example, CLCTL_GET_CHARACTERISTICS describes the operation for retrieving an object's intrinsic attributes. Applications can get the characteristics of resources, resource types, groups, and nodes. CLCTL_ADD_CHECKPOINT describes the operation for adding a registry tree to the list of registry trees that are being replicated. This operation is valid only for resources.
The 2-bit access code indicates whether the initiator of the request requires any specific type of access to perform the operation described by the operation code. Valid values for the access code are CLUS_ACCESS_ANY, CLUS_ACCESS_READ, and CLUS_ACCESS_WRITE.