Error Reporting

This section about IANet_ExtendedStatus describes how to handle errors generated by WMI and CDM Providers. How and when an error object is returned depends on whether a call is synchronous, semi-synchronous or asynchronous. In most cases, the HRESULT is set to WBEM_E_FAILED when an error occurs. At this point, however, it is unknown whether WMI or the Providers generated the error.

To get the error object for synchronous calls, use GetErrorInfo() to get the IErrorInfo object. Use QueryInterface() to get the IWbemClassObject that contains the error information.

To get the error object for asynchronous calls, the IWbemClassObject is passed back as the last item in the last SetStatus() call. After you get the error object instance, you can check the __Class property to determine the origin of the error. WMI creates an instance of __ExtendedStatus, and the Providers create an instance of IANet_ExtendedStatus for errors relating to IANet_ classes. IANet_ExtendedStatus is derived from __ExtendedStatus and contains the following error object qualifiers:

Error Codes

For all error codes, the Providers give a description customized to the locale. Error codes are in the form of HRESULT with severity set to one (1) and facility set to ITF. An application may use the following codes as a basis for a recovery action:

Home


Copyright© 2002 Intel Corporation. Legal Information