Adds a command to a batch that will be executed on a cluster registry key. Additional calls to the function will yield additional commands added to the batch. The batch was created by the ClusterRegCreateBatch function and will be either executed or ignored by the ClusterRegCloseBatch function.
LONG ClusterRegBatchAddCommand( __in HREGBATCH hRegBatch, __in CLUSTER_REG_COMMAND dwCommand, __in_opt LPCWSTR wzName, __in DWORD dwOptions, __in_opt VOID CONST *lpData, __in DWORD cbData );
- hRegBatch [in]
The handle of the batch to which a command will be added.
- dwCommand [in]
A command supported by this API that is taken from the CLUSTER_REG_COMMAND enumeration. The possible commands are as follows.
Sets a value relative to the last executed CLUSREG_CREATE_KEY command or (if not provided) relative to a key passed into the ClusterRegCreateBatch function.
Creates a specified cluster registry key if it doesn't exist, or opens an existing one.
Deletes a key with all values and nested subkeys. No commands that operate on values can follow CLUSREG_DELETE_KEY until CLUSREG_CREATE_KEY is added.
Deletes a value relative to the last executed CLUSREG_CREATE_KEY command or (if not provided) relative to a key passed into the ClusterRegCreateBatch function.
- wzName [in, optional]
The name of the value or key relative to the command issued by the dwCommand parameter.
- dwOptions [in]
If dwCommand takes the CLUSREG_SET_VALUE command, then this parameter takes one of the standard registry value types. If not, then dwCommand is set to 0.
- lpData [in, optional]
A pointer to the data relative to the command issued by dwCommand. The value of this parameter is NULL for all but the CLUSREG_SET_VALUE command.
- cbData [in]
The count, in bytes, of the data relative to the command issued by dwCommand. The value of this parameter is 0 for all but the CLUSREG_SET_VALUE command.
The function returns one of the following system error codes.
The operation was successful.
Incorrect function. This value is returned if dwCommand takes any command other than the commands described in the previous section.
The handle is not valid. This value is returned if the hRegBatch parameter is NULL.
Not enough storage is available to complete this operation.
A device attached to the system is not functioning.
The parameter is incorrect. This value will be returned if the cluster registry key that the batch is attempting to execute commands on is not the current key.
The PCLUSTER_REG_BATCH_ADD_COMMAND type defines a pointer to this function.
|Minimum supported client||None supported|
|Minimum supported server||Windows Server 2008 Datacenter Edition, Windows Server 2008 Enterprise Edition|
Build date: 2/9/2009