Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.9 KiB

  1. /****************************************************************************
  2. Copyright information : Copyright (c) 1998-1999 Microsoft Corporation
  3. File Name : ErrorInfo.h
  4. Project Name : WMI Command Line
  5. Author Name : Ch. Sriramachandramurthy
  6. Date of Creation (dd/mm/yy) : 27th-September-2000
  7. Version Number : 1.0
  8. Revision History :
  9. Last Modified by : Ch. Sriramachandramurthy
  10. Last Modified date : 17th-January-2001
  11. ****************************************************************************/
  12. /*-------------------------------------------------------------------
  13. Class Name : CErrorInfo
  14. Class Type : Concrete
  15. Brief Description : This class encapsulates the error message support
  16. functionality needed by the Format Engine for
  17. dislaying the WBEM error descriptions.
  18. Super Classes : None
  19. Sub Classes : None
  20. Classes Used : None
  21. Interfaces Used : None
  22. --------------------------------------------------------------------*/
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CErrorInfo
  25. class CErrorInfo
  26. {
  27. public:
  28. // Construction
  29. CErrorInfo();
  30. // Destruction
  31. ~CErrorInfo();
  32. // Restrict Assignment
  33. CErrorInfo& operator=(CErrorInfo& rErrInfo);
  34. private:
  35. // Attributes
  36. IWbemStatusCodeText *m_pIStatus;
  37. BOOL m_bWMIErrSrc;
  38. _TCHAR *m_pszErrStr;
  39. // Operations
  40. private:
  41. HRESULT CreateStatusCodeObject();
  42. void GetWbemErrorText(HRESULT hr, BOOL bXML,
  43. _bstr_t& bstrErr, _bstr_t& bstrFacility);
  44. public:
  45. void Uninitialize();
  46. // Return the description & facility code string(s) corresponding to
  47. // hr passed.
  48. void GetErrorString(HRESULT hr, BOOL bTrace,
  49. _bstr_t& bstrErrDesc,
  50. _bstr_t& bstrFacility);
  51. // Frames the XML string for error info
  52. void GetErrorFragment(HRESULT hr, _bstr_t& bstrError);
  53. };