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.

85 lines
2.3 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. smtprov.h
  5. Abstract:
  6. This object is used to store the list of all current
  7. trace providers in the system.
  8. --*/
  9. #ifndef _CLASS_SMTPROV_
  10. #define _CLASS_SMTPROV_
  11. typedef struct _SLQ_TRACE_PROVIDER {
  12. CString strDescription;
  13. CString strGuid;
  14. INT iIsEnabled;
  15. INT iIsActive;
  16. } SLQ_TRACE_PROVIDER, *PSLQ_TRACE_PROVIDER;
  17. class CSmTraceLogService;
  18. struct IWbemServices;
  19. class CSmTraceProviders : public CObject
  20. {
  21. public:
  22. CSmTraceProviders( CSmTraceLogService* );
  23. virtual ~CSmTraceProviders( void );
  24. DWORD Open ( const CString& rstrMachineName );
  25. DWORD Close ( void );
  26. HRESULT SyncWithConfiguration( void );
  27. HRESULT ConnectToServer( void );
  28. HRESULT GetBootState( INT& );
  29. SLQ_TRACE_PROVIDER* GetProviderInfo( INT );
  30. SLQ_TRACE_PROVIDER* GetKernelProviderInfo( void );
  31. INT GetGenProvCount ( void );
  32. INT IndexFromGuid ( const CString& rstrGuid );
  33. DWORD AddProvider (
  34. const CString& rstrDescription,
  35. const CString& rstrGuid,
  36. INT iIsEnabled,
  37. INT iIsActive);
  38. private:
  39. // Helper class
  40. class CRegisteredGuidData
  41. {
  42. public:
  43. CRegisteredGuidData( void ){};
  44. CString m_strGuid;
  45. INT m_iIsEnabled;
  46. };
  47. typedef CRegisteredGuidData* PREGISTERED_GUID_DATA;
  48. static LPCWSTR m_cszBackslash;
  49. static LPCWSTR m_cszDefaultNamespace;
  50. static LPCWSTR m_cszTraceProviderClass;
  51. static LPCWSTR m_cszRegisteredGuidsClass;
  52. static LPCWSTR m_cszDescription;
  53. static LPCWSTR m_cszGuid;
  54. static LPCWSTR m_cszKernelLogger;
  55. CString m_strMachineName;
  56. IWbemServices* m_pWbemServices;
  57. INT m_iBootState;
  58. CArray<SLQ_TRACE_PROVIDER, SLQ_TRACE_PROVIDER&> m_arrGenTraceProvider;
  59. SLQ_TRACE_PROVIDER m_KernelTraceProvider;
  60. CSmTraceLogService* m_pTraceLogService;
  61. };
  62. #endif //_CLASS_SMTPROV_