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.

53 lines
1.3 KiB

  1. #ifndef __HMAGENT_H_
  2. #define __HMAGENT_H_
  3. #include <objbase.h>
  4. #include <tchar.h>
  5. #include <wbemcli.h>
  6. #include <wbemprov.h>
  7. #include <crtdbg.h>
  8. //#include <resource.h>
  9. // Defines
  10. #define EVENT_GENERATION_INTERVAL 2000
  11. #define EVENT_THREAD_TIMEOUT 8000
  12. #define EVENTLOG_MAX_MSG_LENGTH 128
  13. #define EVENTLOG_ID_OFFSET 38
  14. #define EVENTLOG_ID_STARTED 100
  15. #define EVENTLOG_ID_FATAL_ERROR 101
  16. #define EVENTLOG_ID_CIMV2_NAMESPACE_ERROR 102
  17. #define EVENTLOG_ID_HEALTHMON_NAMESPACE_ERROR 103
  18. #define MAX_INSERT_STRINGS 10
  19. #define LOCAL_TIME_FORMAT L"%04d%02d%02d%02d%02d%02d.%06d%c%03d"
  20. #define MAX_CONDITION_LENGTH 3
  21. #define MAX_NAME_LENGTH 256
  22. //federiga begin
  23. #define HM_ASYNC_TIMEOUT 120000
  24. #define HM_PREFIX_LEN 12
  25. #define HM_MAX_PATH 4096
  26. #define HM_GUID_PART L".GUID=\"{"
  27. #define HM_GUID_PART_LEN 8
  28. #define HM_MOD_CLASS_NAME L"__InstanceModificationEvent"
  29. #define HM_START_LINE L"=============== HM 2.1 Debug Log Start ===============\n"
  30. //federiga end
  31. enum ThreadStatus { Pending, Running, PendingStop, Stopped };
  32. HRESULT Register(const wchar_t* szModule, const wchar_t* szName, const wchar_t* szThreading, REFCLSID clsid);
  33. HRESULT UnRegister(REFCLSID clsid);
  34. BOOL Initialize();
  35. void UnInitialize();
  36. BOOL InitializeHealthMon();
  37. BOOL IsNamespaceExist();
  38. #endif