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.

110 lines
2.6 KiB

  1. // *********************************************************************************
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // Module Name:
  6. //
  7. // EventTriggers.h
  8. //
  9. // Abstract:
  10. //
  11. // macros and function prototypes of EventTriggers.cpp
  12. //
  13. // Author:
  14. //
  15. // Akhil V. Gokhale ([email protected])
  16. //
  17. // Revision History:
  18. //
  19. // Akhil V. Gokhale ([email protected])
  20. //
  21. // *********************************************************************************
  22. #ifndef _EVENTTRIGGERS_H
  23. #define _EVENTTRIGGERS_H
  24. // resource header file
  25. #include "resource.h"
  26. #define CLEAN_EXIT 0
  27. #define DIRTY_EXIT 1
  28. #define SINGLE_SLASH L"\\"
  29. #define DOUBLE_SLASH L"\\\\"
  30. #define MIN_MEMORY_REQUIRED 255;
  31. // CLS stands for class
  32. #define CLS_FILTER_TO_CONSUMERBINDING L"__FilterToConsumerBinding"
  33. #define CLS_WIN32_NT_EVENT_LOGFILE L"Win32_NTEventLogFile"
  34. #define CLS_EVENT_FILTER L"__EventFilter"
  35. // FN stands for Function name
  36. #define FN_CREATE_ETRIGGER L"CreateETrigger"
  37. #define FN_DELETE_ETRIGGER L"DeleteETrigger"
  38. // FPR stands for function-parameter
  39. #define FPR_TRIGGER_NAME L"TriggerName"
  40. #define FPR_TRIGGER_DESC L"TriggerDesc"
  41. #define FPR_TRIGGER_QUERY L"TriggerQuery"
  42. #define FPR_TRIGGER_ACTION L"TriggerAction"
  43. #define FPR_TRIGGER_ID L"TriggerID"
  44. #define FPR_RETURN_VALUE L"ReturnValue"
  45. //
  46. // formats ( used in show results )
  47. // command line options and their indexes in the array
  48. #define MAX_COMMANDLINE_OPTION 5//18 // Maximum Command Line List
  49. //#define ET_RES_STRINGS MAX_RES_STRING
  50. //#define ET_RES_BUF_SIZE MAX_RES_STRING
  51. #define ID_HELP 0
  52. #define ID_CREATE 1
  53. #define ID_DELETE 2
  54. #define ID_QUERY 3
  55. #define ID_DEFAULT 4
  56. class CEventTriggers
  57. {
  58. public: // constructure and destructure.
  59. CEventTriggers();
  60. ~CEventTriggers();
  61. // data memebers
  62. private:
  63. LPTSTR m_pszServerNameToShow;
  64. BOOL m_bNeedDisconnect;
  65. TCMDPARSER cmdOptions[MAX_COMMANDLINE_OPTION]; // Array to store command line options
  66. LONG m_lMinMemoryReq;
  67. TARRAY m_arrTemp;
  68. public:
  69. // functions
  70. private:
  71. void PrepareCMDStruct();
  72. public:
  73. void ShowQueryUsage();
  74. void ShowDeleteUsage();
  75. void ShowCreateUsage();
  76. BOOL IsQuery();
  77. BOOL IsDelete();
  78. BOOL IsUsage();
  79. BOOL IsCreate();
  80. BOOL GetNeedPassword();
  81. LONG GetMinMemoryReq();
  82. void ShowMainUsage();
  83. BOOL ProcessOption(DWORD argc, LPCTSTR argv[]);
  84. void CalcMinMemoryReq(DWORD argc, LPCTSTR argv[]);
  85. void UsageMain();
  86. void Initialize();
  87. private:
  88. BOOL m_bNeedPassword;
  89. BOOL m_bUsage;
  90. BOOL m_bCreate;
  91. BOOL m_bDelete;
  92. BOOL m_bQuery;
  93. };
  94. #endif