WMI Non-Error Constants

Header: wbemcli.h

WMI return codes that indicate status and do not indicate an error.

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.

Note

Some methods in WMI classes can return system and network error codes (64 for example). You can check the definition of these types of error codes by using the net helpmsg command in the command prompt window. For example, the command net helpmsg 64 returns the message: The specified network name is no longer available.

In C++, you can call FormatMessage and specify C:\Windows\System32\wbem\wmiutils.dll as the message module.

SymbolicCodeDescription
WBEM_S_NO_ERROR0x0The operation was successful.
WBEM_S_FALSE0x1No more objects are available, the number of objects returned is less than the number requested, or this is the end of an enumeration. This value is also returned when this method is called with a value of 0 for the *uCount* parameter.
WBEM_S_ALREADY_EXISTS0x40001An attempt was made to create an object or class that already exists.
WBEM_S_RESET_TO_DEFAULT0x40002An 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_S_DIFFERENT0x40003The items (objects, classes, and so on) that are being compared are not identical.
WBEM_S_TIMEDOUT0x40004A call timed out. This is not an error condition. Therefore, some results may have also been returned.
WBEM_S_NO_MORE_DATA0x40005No more data is available from the enumeration, and the user must terminate the enumeration.
WBEM_S_OPERATION_CANCELLED0x40006The operation was intentionally or unintentionally canceled.
WBEM_S_PENDING0x40007A request is still in progress, and the results are not yet available.
WBEM_S_DUPLICATE_OBJECTS0x40008More than one copy of the same object was detected in the result set of an enumeration.
WBEM_S_ACCESS_DENIED0x40009The user was denied access to some but not all resources.
WBEM_S_PARTIAL_RESULTS0x40010The user did not receive all of the objects requested due to inaccessible resources (other than security violations).
WBEM_S_LIMITED_SERVICE0x43001The provider is capable of limited service.
WBEM_S_INDIRECTLY_UPDATED0x43002Reserved for future use.
14 entries

Article text from the Win32 documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.