Source code of Windows XP (NT5)
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.

61 lines
1.2 KiB

  1. //***************************************************************************
  2. //
  3. // Copyright (c) 1998-1999 Microsoft Corporation
  4. //
  5. // error.h
  6. //
  7. // alanbos 29-Jun-98 Created.
  8. //
  9. // Error record handling object
  10. //
  11. //***************************************************************************
  12. #ifndef _ERROR_H_
  13. #define _ERROR_H_
  14. //***************************************************************************
  15. //
  16. // CLASS NAME:
  17. //
  18. // CWbemErrorCache
  19. //
  20. // DESCRIPTION:
  21. //
  22. // Holds WBEM-style "last errors" on threads
  23. //
  24. //***************************************************************************
  25. class CWbemErrorCache
  26. {
  27. private:
  28. CRITICAL_SECTION m_cs;
  29. typedef struct ThreadError
  30. {
  31. ThreadError *pNext;
  32. ThreadError *pPrev;
  33. DWORD dwThreadId;
  34. COAUTHIDENTITY *pCoAuthIdentity;
  35. BSTR strAuthority;
  36. BSTR strPrincipal;
  37. BSTR strNamespacePath;
  38. IWbemServices *pService;
  39. IWbemClassObject *pErrorObject;
  40. } ThreadError;
  41. ThreadError *headPtr;
  42. public:
  43. CWbemErrorCache ();
  44. virtual ~CWbemErrorCache ();
  45. CSWbemObject *GetAndResetCurrentThreadError ();
  46. void SetCurrentThreadError (CSWbemServices *pService);
  47. void ResetCurrentThreadError ();
  48. };
  49. #endif