ClusterRegCloseBatch 函数 (clusapi.h)

执行或忽略 由 ClusterRegCreateBatch 函数创建的批处理。

语法

LONG ClusterRegCloseBatch(
  [in]            HREGBATCH hRegBatch,
  [in]            BOOL      bCommit,
  [out, optional] INT       *failedCommandNumber
);

参数

[in] hRegBatch

ClusterRegCreateBatch 打开的群集注册表项的句柄。 ClusterRegCloseBatch 完成后,此句柄不再有效,并释放与其关联的内存。

[in] bCommit

如果此参数采用的值为 true,则会将批处理发送到群集服务器执行。

[out, optional] failedCommandNumber

如果批处理执行不成功,则会以 failedCommandNumber 参数的形式返回失败的命令编号。 批中的第一个命令具有数字 0,第二个命令具有数字 1,依序。

返回值

函数返回以下 系统错误代码之一。

返回代码/值 说明
ERROR_SUCCESS
0
操作成功。
ERROR_INVALID_HANDLE
6
句柄无效。 如果 hRegBatch 参数为 NULL,则返回此值。

注解

如果在执行任何命令之前发生故障,则 failedCommandNumber 参数将设置为 –1。

PCLUSTER_REG_CLOSE_BATCH类型定义指向此函数的指针。

要求

要求
最低受支持的客户端 无受支持的版本
最低受支持的服务器 Windows Server 2008 Datacenter、Windows Server 2008 Enterprise
目标平台 Windows
标头 clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

另请参阅

群集注册表访问函数

ClusterRegBatchAddCommand

ClusterRegCloseBatchEx

ClusterRegCreateBatch