WMI 非错误常量WMI Non-Error Constants

WMI 返回指示状态的代码,但不指示错误。WMI return codes that indicate status and do not indicate an error.

如果操作不会导致错误,WMI 会以 HRESULT 形式返回以下代码之一,指示操作的状态。If an operation does not result in an error, WMI returns one of the following codes as an HRESULT that indicates the status of the operation.

备注

WMI 类中的某些方法可能会返回系统和网络错误代码 (64,例如) 。Some methods in WMI classes can return system and network error codes (64 for example). 您可以使用 "命令提示符" 窗口中的 net helpmsg 命令检查这些类型的错误代码的定义。You can check the definition of these types of error codes by using the net helpmsg command in the command prompt window. 例如,命令 net helpmsg 64 返回消息:指定的网络名称不再可用。For example, the command net helpmsg 64 returns the message: The specified network name is no longer available.

在 c + + 中,可以调用 FormatMessage 并指定 C: \ Windows \ System32 \ wbem \wmiutils.dll 作为消息模块。In C++, you can call FormatMessage and specify C:\Windows\System32\wbem\wmiutils.dll as the message module.

WBEM _ , _ 无 _ 错误WBEM_S_NO_ERROR

0 (0x0) 0 (0x0)

操作成功。The operation was successful.

WBEM _ S _ FALSEWBEM_S_FALSE

1 (0x1) 1 (0x1)

没有更多的对象可用,返回的对象数小于请求的数目,或者这是枚举的结尾。No more objects are available, the number of objects returned is less than the number requested, or this is the end of an enumeration. 当使用 uCount 参数的值0调用此方法时,也会返回此值。This value is also returned when this method is called with a value of 0 for the uCount parameter.

WBEM _ _ 已经 _ 存在WBEM_S_ALREADY_EXISTS

262145 (0x40001) 262145 (0x40001)

尝试创建已存在的对象或类。An attempt was made to create an object or class that already exists.

WBEM _ S _ 重置 _ 为 _ 默认值WBEM_S_RESET_TO_DEFAULT

262146 (0x40002) 262146 (0x40002)

重写的属性已删除。An overridden property was deleted. 返回此值是为了表明原始非覆盖值已由于删除而被还原。This value is returned to signal that the original non-overridden value has been restored as a result of the deletion.

WBEM _ _ 不同WBEM_S_DIFFERENT

262147 (0x40003) 262147 (0x40003)

要进行比较的 (对象、类等) 项不完全相同。The items (objects, classes, and so on) that are being compared are not identical.

WBEM _ S _ 超时WBEM_S_TIMEDOUT

262148 (0x40004) 262148 (0x40004)

调用超时。这不是一个错误情况。A call timed out. This is not an error condition. 因此,可能还会返回某些结果。Therefore, some results may have also been returned.

WBEM _ , _ 无 _ 更多 _ 数据WBEM_S_NO_MORE_DATA

262149 (0x40005) 262149 (0x40005)

枚举中没有更多的可用数据,用户必须终止枚举。No more data is available from the enumeration, and the user must terminate the enumeration.

WBEM _ S _ 操作已 _ 取消WBEM_S_OPERATION_CANCELLED

262150 (0x40006) 262150 (0x40006)

操作有意或无意地取消。The operation was intentionally or unintentionally canceled.

WBEM _ 已 _ 挂起WBEM_S_PENDING

262151 (0x40007) 262151 (0x40007)

请求仍在进行中,结果尚不可用。A request is still in progress, and the results are not yet available.

WBEM _ 个 _ 重复 _ 对象WBEM_S_DUPLICATE_OBJECTS

262152 (0x40008) 262152 (0x40008)

在一个枚举的结果集内检测到同一对象的多个副本。More than one copy of the same object was detected in the result set of an enumeration.

WBEM _ S _ 访问 _ 被拒绝WBEM_S_ACCESS_DENIED

262153 (0x40009) 262153 (0x40009)

用户被拒绝访问某些但并非所有资源。The user was denied access to some but not all resources.

WBEM _ _ 部分 _ 结果WBEM_S_PARTIAL_RESULTS

262160 (0x40010) 262160 (0x40010)

由于无法访问的资源 (除了安全冲突) 以外,用户未接收到所有请求的对象。The user did not receive all of the objects requested due to inaccessible resources (other than security violations).

WBEM _ _ 服务受限 _ 服务WBEM_S_LIMITED_SERVICE

274433 (0x43001) 274433 (0x43001)

提供程序支持有限的服务。The provider is capable of limited service.

WBEM _ _ 已间接 _ 更新WBEM_S_INDIRECTLY_UPDATED

274434 (0x43002) 274434 (0x43002)

保留供将来使用。Reserved for future use.

要求Requirements

要求Requirement Value
最低受支持的客户端Minimum supported client
Windows VistaWindows Vista
最低受支持的服务器Minimum supported server
Windows Server 2008Windows Server 2008
标头Header
WbemCli
WbemCli.h
.IDLIDL
WbemCli .idl
WbemCli.idl

另请参阅See also

WMI 返回代码WMI Return Codes