MSFT_TemplateErrorStatus class

The MSFT_TemplateErrorStatus class represents error information returned by the template provider when creating template instances. This information is in the form of a COM error object and implements IWbemClassObject.

Note  For more information about support and installation of this component on a specific operating system, see Operating System Availability of WMI Components.


class MSFT_TemplateErrorStatus : __ExtendedStatus
  string               Description;
  string               ErrorStr;
  object               ExtendedStatus;
  string               Operation;
  string               ParameterInfo;
  string               ProviderName;
  string               Property;
  uint32               StatusCode;
  object               Target;
  MSFT_TemplateBuilder Builder;


The MSFT_TemplateErrorStatus class has these types of members:


The MSFT_TemplateErrorStatus class has these properties.

Data type: MSFT_TemplateBuilder
Access type: Read-only
Qualifiers: NotNull

Embedded template builder object that the Template Provider was working on when the error occurred. This property cannot be NULL.

Data type: string
Access type: Read-only

Any user-defined string that describes an error or operational status.

Data type: string
Access type: Read-only

Description of the cause of the current error.

Data type: object
Access type: Read-only

Embedded object that permits the error object that results from a failed Provider::PutInstance call to be propagated up the instantiation chain. This error object is created by the instance provider for the object held in the template builder. This property is NULL if there is an error in substitution, or if the provider that backs the template object does not return an extended error object. In the case of nested templates, the ExtendedStatus object could be another instance of TemplateErrorStatus.

Data type: string
Access type: Read-only

Operation that was taking place at the time of the failure or anomaly. Typically, Windows Management Instrumentation (WMI) sets this property to the name of a COM API for WMI method such as IWbemServices::CreateInstanceEnum.

Data type: string
Access type: Read-only

Parameter that was involved in the error or status change. For example, if an application attempted to retrieve a class that does not exist, this property would be set to the offending class name.

Data type: string
Access type: Read-only

Property of the TemplateObject object on which the TemplateProvider tried to perform a substitution before creating the object. Can be NULL (when the substitution was performed successfully, but the Provider::PutInstance call failed).

Data type: string
Access type: Read-only

Identifies the provider that caused or reported the error or status change. If a provider was not involved, this string is set to "Windows Management".

Data type: uint32
Access type: Read-only

Contains an error or information code for an operation. This can be any user-defined code, but the value 0 (zero) is usually reserved to indicate success.

Data type: object
Access type: Read-only

Embedded object that is created by the template builder. All substitutions have been performed at this point. This property is NULL when there is an error in substitution.


For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.


Minimum supported client

Windows XP

Minimum supported server

None supported

End of client support

Windows XP







See also

Correlation Consumers