Leaked source code of windows server 2003
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.

93 lines
2.0 KiB

  1. /******************************************************************************
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. EventTriggers.h
  5. Abstract:
  6. macros and function prototypes of EventTriggers.cpp
  7. Author:
  8. Akhil V. Gokhale (akhil.gokhale@wipro.com)
  9. Revision History:
  10. Akhil V. Gokhale (akhil.gokhale@wipro.com) 03-Oct-2000 (Created)
  11. ******************************************************************************/
  12. #ifndef _EVENTTRIGGERS_H
  13. #define _EVENTTRIGGERS_H
  14. // resource header file
  15. #include "resource.h"
  16. #define CLEAN_EXIT 0
  17. #define DIRTY_EXIT 1
  18. #define SINGLE_SLASH L"\\"
  19. #define DOUBLE_SLASH L"\\\\"
  20. #define MIN_MEMORY_REQUIRED 255;
  21. //
  22. // formats ( used in show results )
  23. // command line options and their indexes in the array
  24. #define MAX_COMMANDLINE_OPTION 5 // Maximum Command Line List
  25. //#define ET_RES_STRINGS MAX_RES_STRING
  26. //#define ET_RES_BUF_SIZE MAX_RES_STRING
  27. #define ID_HELP 0
  28. #define ID_CREATE 1
  29. #define ID_DELETE 2
  30. #define ID_QUERY 3
  31. #define ID_DEFAULT 4
  32. class CEventTriggers
  33. {
  34. public: // constructure and destructure.
  35. CEventTriggers();
  36. ~CEventTriggers();
  37. // data memebers
  38. private:
  39. LPTSTR m_pszServerNameToShow;
  40. BOOL m_bNeedDisconnect;
  41. // Array to store command line options
  42. TCMDPARSER2 cmdOptions[MAX_COMMANDLINE_OPTION];
  43. TARRAY m_arrTemp;
  44. public:
  45. // functions
  46. private:
  47. void PrepareCMDStruct();
  48. public:
  49. void ShowQueryUsage();
  50. void ShowDeleteUsage();
  51. void ShowCreateUsage();
  52. BOOL IsQuery();
  53. BOOL IsDelete();
  54. BOOL IsUsage();
  55. BOOL IsCreate();
  56. BOOL GetNeedPassword();
  57. void ShowMainUsage();
  58. BOOL ProcessOption( IN DWORD argc, IN LPCTSTR argv[]);
  59. void UsageMain();
  60. void Initialize();
  61. private:
  62. BOOL m_bNeedPassword;
  63. BOOL m_bUsage;
  64. BOOL m_bCreate;
  65. BOOL m_bDelete;
  66. BOOL m_bQuery;
  67. };
  68. #endif