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.

90 lines
1.7 KiB

  1. #include "stdafx.h"
  2. #include "evtview.h"
  3. #include "doc.h"
  4. #include "clusapi.h"
  5. #include "schview.h"
  6. CEvtviewDoc *pEventDoc ;
  7. CPtrList ptrlstSInfo ;
  8. EVENTDEFINITION aClusEventDefinition = {
  9. EVENT_CATAGORY_CLUSTER,
  10. aTypeMap,
  11. aSubTypeMap,
  12. L"CLUSTER",
  13. L"Filter Type:",
  14. L"Sub Filter",
  15. L"Cluster Name",
  16. L"Object Name"
  17. } ;
  18. DWORDTOSTRINGMAP aClusConsistTypeMap [] =
  19. {
  20. {L"CONSISTENCY", EVENT_FILTER_CONSISTENCY},
  21. {NULL, 0 }
  22. } ;
  23. EVENTDEFINITION aClusConsistEventDefinition = {
  24. EVENT_CATAGORY_CLUSTER_CONSISTENCY,
  25. aClusConsistTypeMap,
  26. NULL,
  27. L"CLUSTER CONSISTENCY",
  28. L"Filter Type:",
  29. L"Sub Filter",
  30. L"Cluster Name",
  31. L"Object Name"
  32. } ;
  33. DWORDTOSTRINGMAP aAction [] = {
  34. {L"COMMAND", SCHEDULE_ACTION_COMMAND },
  35. {NULL, 0 },
  36. } ;
  37. HWND hScheduleWnd ;
  38. //CTime minTime ;
  39. UINT_PTR nIDTimer ;
  40. CPtrList ptrlstEventDef ;
  41. // For the modeless dialog to display the event list
  42. CScheduleView oScheduleView ;
  43. PEVENTDEFINITION GetEventDefinition (DWORD_PTR dwCatagory)
  44. {
  45. POSITION pos = ptrlstEventDef.GetHeadPosition () ;
  46. PEVENTDEFINITION pEvtDef ;
  47. while (pos)
  48. {
  49. pEvtDef = (PEVENTDEFINITION) ptrlstEventDef.GetNext (pos) ;
  50. if (pEvtDef->dwCatagory == dwCatagory)
  51. return pEvtDef ;
  52. }
  53. return NULL ;
  54. }
  55. LPCWSTR GetType (DWORD_PTR dwCatagory, DWORD_PTR dwCode)
  56. {
  57. int i = 0;
  58. PEVENTDEFINITION pEvtDef = GetEventDefinition (dwCatagory) ;
  59. return GetType (pEvtDef->pFilter, dwCode) ;
  60. }
  61. LPCWSTR GetSubType (DWORD_PTR dwCatagory, DWORD dwCode, DWORD dwSubCode)
  62. {
  63. int i = 0;
  64. PEVENTDEFINITION pEvtDef = GetEventDefinition (dwCatagory) ;
  65. LPCWSTR psz = GetSubType (pEvtDef->pSubFilter, dwCode, dwSubCode) ;
  66. return (wcscmp (psz, L"Unknown Type") == 0)?L"":psz ;
  67. }