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.

100 lines
2.5 KiB

  1. /*****************************************************************************
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. ETCreate.h
  5. Abstract:
  6. This module contanins function definations required by ETCreate.cpp
  7. Author:
  8. Akhil Gokhale 03-Oct.-2000
  9. Revision History:
  10. *****************************************************************************/
  11. #ifndef _ETCREATE_H
  12. #define _ETCREATE_H
  13. #define ID_C_CREATE 0
  14. #define ID_C_SERVER 1
  15. #define ID_C_USERNAME 2
  16. #define ID_C_PASSWORD 3
  17. #define ID_C_TRIGGERNAME 4
  18. #define ID_C_LOGNAME 5
  19. #define ID_C_ID 6
  20. #define ID_C_TYPE 7
  21. #define ID_C_SOURCE 8
  22. #define ID_C_DESCRIPTION 9
  23. #define ID_C_TASK 10
  24. #define ID_C_RU 11
  25. #define ID_C_RP 12
  26. #define MAX_COMMANDLINE_C_OPTION 13 // Maximum Command Line List
  27. class CETCreate
  28. {
  29. public:
  30. CETCreate();
  31. CETCreate(LONG lMinMemoryReq,BOOL bNeedPassword);
  32. virtual ~CETCreate();
  33. public:
  34. BOOL ExecuteCreate();
  35. void ProcessOption(DWORD argc, LPCTSTR argv[]);
  36. void Initialize();
  37. private:
  38. LPTSTR m_pszWMIQueryString;
  39. BOOL CheckLogName(PTCHAR pszLogName,IWbemServices *pNamespace);
  40. BOOL GetLogName(PTCHAR pszLogName,
  41. IEnumWbemClassObject *pEnumWin32_NTEventLogFile);
  42. BOOL ConstructWMIQueryString();
  43. void CheckRpRu(void);
  44. CONSOLE_SCREEN_BUFFER_INFO m_ScreenBufferInfo;
  45. HANDLE m_hStdHandle;
  46. LPTSTR m_pszServerName;
  47. LPTSTR m_pszUserName;
  48. LPTSTR m_pszPassword;
  49. LPTSTR m_pszTriggerName;
  50. LPTSTR m_pszRunAsUserName;
  51. LPTSTR m_pszRunAsUserPassword;
  52. TARRAY m_arrLogNames;
  53. DWORD m_dwID;
  54. LPTSTR m_pszType;
  55. LPTSTR m_pszSource;
  56. LPTSTR m_pszDescription;
  57. LPTSTR m_pszTaskName;
  58. BOOL m_bNeedPassword;
  59. BOOL m_bCreate;
  60. BOOL m_bLocalSystem;
  61. BOOL m_bIsCOMInitialize;
  62. BSTR bstrTemp;
  63. // WMI / COM interfaces
  64. IWbemLocator* m_pWbemLocator;
  65. IWbemServices* m_pWbemServices;
  66. IEnumWbemClassObject* m_pEnumObjects;
  67. IWbemClassObject* m_pClass;
  68. IWbemClassObject* m_pOutInst;
  69. IWbemClassObject* m_pInClass;
  70. IWbemClassObject* m_pInInst;
  71. IEnumWbemClassObject* m_pEnumWin32_NTEventLogFile;
  72. // WMI connectivity
  73. COAUTHIDENTITY* m_pAuthIdentity;
  74. void InitCOM();
  75. void CheckAndSetMemoryAllocation(LPTSTR pszStr,LONG lSize);
  76. void PrepareCMDStruct();
  77. LONG m_lMinMemoryReq;
  78. // Array to store command line options
  79. TCMDPARSER cmdOptions[MAX_COMMANDLINE_C_OPTION];
  80. };
  81. #endif