WbemErrorEnum Enumeration

The WbemErrorEnum constants define the errors that may be returned by Scripting API for WMI calls.

The WMI scripting type library Wbemdisp.tlb defines these constants. Visual Basic applications can access this library; script languages must use the value of the constant directly, unless they use the Windows Script Host (WSH) XML file format. For more information, see Using the WMI Scripting Type Library.

Other languages may have different names for these values, see WMI Error Constants and WBEMSTATUS.


typedef enum WbemErrorEnum {
  wbemNoErr                            ,
  wbemErrFailed                        ,
  wbemErrNotFound                      ,
  wbemErrAccessDenied                  ,
  wbemErrProviderFailure               ,
  wbemErrTypeMismatch                  ,
  wbemErrOutOfMemory                   ,
  wbemErrInvalidContext                ,
  wbemErrInvalidParameter              ,
  wbemErrNotAvailable                  ,
  wbemErrCriticalError                 ,
  wbemErrInvalidStream                 ,
  wbemErrNotSupported                  ,
  wbemErrInvalidSuperclass             ,
  wbemErrInvalidNamespace              ,
  wbemErrInvalidObject                 ,
  wbemErrInvalidClass                  ,
  wbemErrProviderNotFound              ,
  wbemErrInvalidProviderRegistration   ,
  wbemErrProviderLoadFailure           ,
  wbemErrInitializationFailure         ,
  wbemErrTransportFailure              ,
  wbemErrInvalidOperation              ,
  wbemErrInvalidQuery                  ,
  wbemErrInvalidQueryType              ,
  wbemErrAlreadyExists                 ,
  wbemErrOverrideNotAllowed            ,
  wbemErrPropagatedQualifier           ,
  wbemErrPropagatedProperty            ,
  wbemErrUnexpected                    ,
  wbemErrIllegalOperation              ,
  wbemErrCannotBeKey                   ,
  wbemErrIncompleteClass               ,
  wbemErrInvalidSyntax                 ,
  wbemErrNondecoratedObject            ,
  wbemErrReadOnly                      ,
  wbemErrProviderNotCapable            ,
  wbemErrClassHasChildren              ,
  wbemErrClassHasInstances             ,
  wbemErrQueryNotImplemented           ,
  wbemErrIllegalNull                   ,
  wbemErrInvalidQualifierType          ,
  wbemErrInvalidPropertyType           ,
  wbemErrValueOutOfRange               ,
  wbemErrCannotBeSingleton             ,
  wbemErrInvalidCimType                ,
  wbemErrInvalidMethod                 ,
  wbemErrInvalidMethodParameters       ,
  wbemErrSystemProperty                ,
  wbemErrInvalidProperty               ,
  wbemErrCallCancelled                 ,
  wbemErrShuttingDown                  ,
  wbemErrPropagatedMethod              ,
  wbemErrUnsupportedParameter          ,
  wbemErrMissingParameter              ,
  wbemErrInvalidParameterId            ,
  wbemErrNonConsecutiveParameterIds    ,
  wbemErrParameterIdOnRetval           ,
  wbemErrInvalidObjectPath             ,
  wbemErrOutOfDiskSpace                ,
  wbemErrBufferTooSmall                ,
  wbemErrUnsupportedPutExtension       ,
  wbemErrUnknownObjectType             ,
  wbemErrUnknownPacketType             ,
  wbemErrMarshalVersionMismatch        ,
  wbemErrMarshalInvalidSignature       ,
  wbemErrInvalidQualifier              ,
  wbemErrInvalidDuplicateParameter     ,
  wbemErrTooMuchData                   ,
  wbemErrServerTooBusy                 ,
  wbemErrInvalidFlavor                 ,
  wbemErrCircularReference             ,
  wbemErrUnsupportedClassUpdate        ,
  wbemErrCannotChangeKeyInheritance    ,
  wbemErrCannotChangeIndexInheritance  ,
  wbemErrTooManyProperties             ,
  wbemErrUpdateTypeMismatch            ,
  wbemErrUpdateOverrideNotAllowed      ,
  wbemErrUpdatePropagatedMethod        ,
  wbemErrMethodNotImplemented          ,
  wbemErrMethodDisabled                ,
  wbemErrRefresherBusy                 ,
  wbemErrUnparsableQuery               ,
  wbemErrNotEventClass                 ,
  wbemErrMissingGroupWithin            ,
  wbemErrMissingAggregationList        ,
  wbemErrPropertyNotAnObject           ,
  wbemErrAggregatingByObject           ,
  wbemErrUninterpretableProviderQuery  ,
  wbemErrBackupRestoreWinmgmtRunning   ,
  wbemErrQueueOverflow                 ,
  wbemErrPrivilegeNotHeld              ,
  wbemErrInvalidOperator               ,
  wbemErrLocalCredentials              ,
  wbemErrCannotBeAbstract              ,
  wbemErrAmendedObject                 ,
  wbemErrClientTooSlow                 ,
  wbemErrNullSecurityDescriptor        ,
  wbemErrTimeout                       ,
  wbemErrInvalidAssociation            ,
  wbemErrAmbiguousOperation            ,
  wbemErrQuotaViolation                ,
  wbemErrTransactionConflict           ,
  wbemErrForcedRollback                ,
  wbemErrUnsupportedLocale             ,
  wbemErrHandleOutOfDate               ,
  wbemErrConnectionFailed              ,
  wbemErrInvalidHandleRequest          ,
  wbemErrPropertyNameTooWide           ,
  wbemErrClassNameTooWide              ,
  wbemErrMethodNameTooWide             ,
  wbemErrQualifierNameTooWide          ,
  wbemErrRerunCommand                  ,
  wbemErrDatabaseVerMismatch           ,
  wbemErrVetoPut                       ,
  wbemErrVetoDelete                    ,
  wbemErrInvalidLocale                 ,
  wbemErrProviderSuspended             ,
  wbemErrSynchronizationRequired       ,
  wbemErrNoSchema                      ,
  wbemErrProviderAlreadyRegistered     ,
  wbemErrProviderNotRegistered         ,
  wbemErrFatalTransportError           ,
  wbemErrEncryptedConnectionRequired   ,
  wbemErrRegistrationTooBroad          ,
  wbemErrRegistrationTooPrecise        ,
  wbemErrTimedout                      ,
} ;


wbemNoErr The call was successful.
wbemErrFailed The call failed.
wbemErrNotFound The object could not be found.
wbemErrAccessDenied The current user does not have permission to perform the action.
wbemErrProviderFailure The provider has failed at some time other than during initialization.
wbemErrTypeMismatch A type mismatch occurred.
wbemErrOutOfMemory There was not enough memory for the operation.
wbemErrInvalidContext The SWbemNamedValue object is not valid.
wbemErrInvalidParameter One of the parameters to the call is not correct.
wbemErrNotAvailable The resource, typically a remote server, is not currently available.
wbemErrCriticalError An internal, critical, and unexpected error occurred. Report this error to Microsoft Technical Support.
wbemErrInvalidStream One or more network packets were corrupted during a remote session.
wbemErrNotSupported The feature or operation is not supported.
wbemErrInvalidSuperclass The parent class specified is not valid.
wbemErrInvalidNamespace The namespace specified could not be found.
wbemErrInvalidObject The specified instance is not valid.
wbemErrInvalidClass The specified class is not valid.
wbemErrProviderNotFound A provider referenced in the schema does not have a corresponding registration.
wbemErrInvalidProviderRegistration A provider referenced in the schema has an incorrect or incomplete registration. This error may be caused by a missing pragma namespace command in the MOF file used to register the provider, resulting in the provider being registered in the wrong WMI namespace. This error may also be caused by a corrupt repository, which may be fixed by deleting it and recompiling the MOF files.
wbemErrProviderLoadFailure COM cannot locate a provider referenced in the schema. This error may be caused by any of the following:

The provider is using a WMI DLL that does not match the .lib fileused when the provider was built.

The provider's DLL or any of the DLLs on which it depends is corrupt.

The provider failed to export DllRegisterServer.

An in-process provider was not registered using /regsvr32.

An out-of-process provider was not registered using /regserver.

wbemErrInitializationFailure A component, such as a provider, failed to initialize for internal reasons.
wbemErrTransportFailure A networking error occurred, preventing normal operation.
wbemErrInvalidOperation The requested operation is not valid. This error usually applies to invalid attempts to delete classes or properties.
wbemErrInvalidQuery The requested operation is not valid. This error usually applies to invalid attempts to delete classes or properties.
wbemErrInvalidQueryType The requested query language is not supported.
wbemErrAlreadyExists In a put operation, the wbemChangeFlagCreateOnly flag was specified, but the instance already exists.
wbemErrOverrideNotAllowed It is not possible to perform the add operation on this qualifier because the owning object does not permit overrides.
wbemErrPropagatedQualifier The user attempted to delete a qualifier that was not owned. The qualifier was inherited from a parent class.
wbemErrPropagatedProperty The user attempted to delete a property that was not owned. The property was inherited from a parent class.
wbemErrUnexpected The client made an unexpected and illegal sequence of calls, such as calling EndEnumeration before calling BeginEnumeration.
wbemErrIllegalOperation The user requested an illegal operation, such as spawning a class from an instance.
wbemErrCannotBeKey There was an illegal attempt to specify a key qualifier on a property that cannot be a key. The keys are specified in the class definition for an object, and cannot be altered on a per-instance basis.
wbemErrIncompleteClass The current object is not a valid class definition. Either it is incomplete, or it has not been registered with WMI using SWbemObject.Put_.
wbemErrInvalidSyntax The syntax of an input parameter is incorrect for the applicable data structure. For example, when a CIM datetime structure does not have the correct format when passed to SWbemDateTime.SetFileTime.
wbemErrNondecoratedObject Reserved for future use.
wbemErrReadOnly The property that you are attempting to modify is read-only.
wbemErrProviderNotCapable The provider cannot perform the requested operation. This would include a query that is too complex, retrieving an instance, creating or updating a class, deleting a class, or enumerating a class.
wbemErrClassHasChildren An attempt was made to make a change that would invalidate a subclass.
wbemErrClassHasInstances An attempt has been made to delete or modify a class that has instances.
wbemErrQueryNotImplemented Reserved for future use.
wbemErrIllegalNull A value of Nothing was specified for a property that may not be Nothing, such as one that is marked by a Key, Indexed, or Not_Null qualifier.
wbemErrInvalidQualifierType The CIM type specified for a property is not valid.
wbemErrInvalidPropertyType The CIM type specified for a property is not valid.
wbemErrValueOutOfRange The request was made with an out-of-range value, or is incompatible with the type.
wbemErrCannotBeSingleton An illegal attempt was made to make a class singleton, such as when the class is derived from a non-singleton class.
wbemErrInvalidCimType The CIM type specified is not valid.
wbemErrInvalidMethod The requested method is not available.
wbemErrInvalidMethodParameters The parameters provided for the method are not valid.
wbemErrSystemProperty There was an attempt to get qualifiers on a system property.
wbemErrInvalidProperty The property type is not recognized.
wbemErrCallCancelled An asynchronous process has been canceled internally or by the user. Note that due to the timing and nature of the asynchronous operation the operation may not have been truly canceled.
wbemErrShuttingDown The user has requested an operation while WMI is in the process of shutting down.
wbemErrPropagatedMethod An attempt was made to reuse an existing method name from a parent class, and the signatures did not match.
wbemErrUnsupportedParameter One or more parameter values, such as a query text, is too complex or unsupported. WMI is therefore requested to retry the operation with simpler parameters.
wbemErrMissingParameter A parameter was missing from the method call.
wbemErrInvalidParameterId A method parameter has an ID qualifier that is not valid.
wbemErrNonConsecutiveParameterIds One or more of the method parameters have ID qualifiers that are out of sequence.
wbemErrParameterIdOnRetval The return value for a method has an ID qualifier.
wbemErrInvalidObjectPath The specified object path was not valid.
wbemErrOutOfDiskSpace Disk is out of space or the 4 GB limit on WMI repository (CIM repository) size is reached.
wbemErrBufferTooSmall The supplied buffer was too small to hold all the objects in the enumerator or to read a string property.
wbemErrUnsupportedPutExtension The provider does not support the requested put operation.
wbemErrUnknownObjectType An object with an incorrect type or version was encountered during marshaling.
wbemErrUnknownPacketType A packet with an incorrect type or version was encountered during marshaling.
wbemErrMarshalVersionMismatch The packet has an unsupported version.
wbemErrMarshalInvalidSignature The packet appears to be corrupted.
wbemErrInvalidQualifier An attempt has been made to mismatch qualifiers, such as putting [key] on an object instead of a property.
wbemErrInvalidDuplicateParameter A duplicate parameter has been declared in a CIM method.
wbemErrTooMuchData Reserved for future use.
wbemErrServerTooBusy A call to IWbemObjectSink::Indicate has failed. The provider may choose to refire the event.
wbemErrInvalidFlavor The specified flavor was not valid.
wbemErrCircularReference An attempt has been made to create a reference that is circular (for example, deriving a class from itself).
wbemErrUnsupportedClassUpdate The specified class is not supported.
wbemErrCannotChangeKeyInheritance An attempt was made to change a key when instances or subclasses are already using the key.
wbemErrCannotChangeIndexInheritance An attempt was made to change an index when instances or subclasses are already using the index.
wbemErrTooManyProperties An attempt was made to create more properties than the current version of the class supports.
wbemErrUpdateTypeMismatch A property was redefined with a conflicting type in a derived class.
wbemErrUpdateOverrideNotAllowed An attempt was made in a derived class to override a non-overrideable qualifier.
wbemErrUpdatePropagatedMethod A method was redeclared with a conflicting signature in a derived class.
wbemErrMethodNotImplemented An attempt was made to execute a method not marked with [implemented] in any relevant class.
wbemErrMethodDisabled An attempt was made to execute a method marked with [disabled].
wbemErrRefresherBusy The refresher is busy with another operation.
wbemErrUnparsableQuery The filtering query is syntactically not valid.
wbemErrNotEventClass The FROM clause of a filtering query references a class that is not an event class (not derived from __Event).
wbemErrMissingGroupWithin A GROUP BY clause was used without the corresponding GROUP WITHIN clause.
wbemErrMissingAggregationList A GROUP BY clause was used. Aggregation on all properties is not supported.
wbemErrPropertyNotAnObject Dot notation was used on a property that is not an embedded object.
wbemErrAggregatingByObject A GROUP BY clause references a property that is an embedded object without using dot notation.
wbemErrUninterpretableProviderQuery An event provider registration query (__EventProviderRegistration) did not specify the classes for which events were provided.
wbemErrBackupRestoreWinmgmtRunning An request was made to back up or restore the repository while WMI was using it.
wbemErrQueueOverflow The asynchronous delivery queue overflowed due to the event consumer being too slow.
wbemErrPrivilegeNotHeld The operation failed because the client did not have the necessary security privilege.
wbemErrInvalidOperator The operator is not valid for this property type.
wbemErrLocalCredentials The user specified a username, password or authority for a local connection. The user must use a blank username/password and rely on default security.
wbemErrCannotBeAbstract The class was made abstract when its parent class is not abstract.
wbemErrAmendedObject An amended object was put without the wbemFlagUseAmendedQualifiers flag being specified.
wbemErrClientTooSlow The client was not retrieving objects quickly enough from an enumeration. This constant is returned when a client creates an enumeration object but does not retrieve objects from the enumerator in a timely fashion, causing the enumerator's object caches to get backed up.
wbemErrNullSecurityDescriptor A null security descriptor was used.
wbemErrTimeout The operation timed out.
wbemErrInvalidAssociation The association being used is not valid.
wbemErrAmbiguousOperation The operation was ambiguous.
wbemErrQuotaViolation WMI is taking up too much memory. This could be caused either by low memory availability or excessive memory consumption by WMI.
wbemErrTransactionConflict The operation resulted in a transaction conflict.
wbemErrForcedRollback The transaction forced a rollback.
wbemErrUnsupportedLocale The locale used in the call is not supported.
wbemErrHandleOutOfDate The object handle is out of date.
wbemErrConnectionFailed Indicates that the connection to the SQL database failed.
wbemErrInvalidHandleRequest The handle request was not valid.
wbemErrPropertyNameTooWide The property name contains more than 255 characters.
wbemErrClassNameTooWide The class name contains more than 255 characters.
wbemErrMethodNameTooWide The method name contains more than 255 characters.
wbemErrQualifierNameTooWide The qualifier name contains more than 255 characters.
wbemErrRerunCommand Indicates that an SQL command should be rerun because there is a deadlock in SQL. This can be returned only when data is being stored in an SQL database.
wbemErrDatabaseVerMismatch The database version does not match the version that the repository driver processes.
wbemErrVetoPut WMI cannot do the put operation because the provider does not allow it.
wbemErrVetoDelete WMI cannot do the delete operation because the provider does not allow it.
wbemErrInvalidLocale The specified locale identifier was not valid for the operation.
wbemErrProviderSuspended The provider is suspended.
wbemErrSynchronizationRequired The object must be committed and retrieved again before the requested operation can succeed. This constant is returned when an object must be committed and re-retrieved to see the property value.
wbemErrNoSchema The operation cannot be completed because no schema is available.
wbemErrProviderAlreadyRegistered The provider registration cannot be done because the provider is already registered.
wbemErrProviderNotRegistered The provider for the requested data is not registered.
wbemErrFatalTransportError A fatal transport error occurred and other transport will not be attempted.
wbemErrEncryptedConnectionRequired The client connection to WINMGMT must be encrypted for this operation. The IWbemServices proxy security settings should be adjusted and the operation retried.
wbemErrRegistrationTooBroad The provider registration overlaps with the system event domain.
wbemErrRegistrationTooPrecise A WITHIN clause was not used in this query.
wbemErrTimedout Automation-specific error.
wbemErrResetToDefault The user deleted an override default value for the current class. The default value for this property in the parent class has been reactivated. An automation-specific error.


Windows version Windows Vista Windows Server 2008
Header wbemdisp.h

See Also

Scripting API Constants


WMI Error Constants