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.

104 lines
2.5 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998
  5. //
  6. // File: ScripLog.h
  7. //
  8. // Contents:
  9. //
  10. // History: 9-Aug-99 NishadM Created
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef _SCRIPLOG_H_
  14. #define _SCRIPLOG_H_
  15. #include <initguid.h>
  16. #include <wbemcli.h>
  17. #include "smartptr.h"
  18. #include "scrpdata.h"
  19. class CScriptsLogger
  20. {
  21. public:
  22. CScriptsLogger( IWbemServices* pWbemServices );
  23. //
  24. // Creates or Updates RSOP_ScriptPolicySetting
  25. //
  26. HRESULT
  27. Log(PRSOP_ScriptList pList,
  28. LPWSTR wszGPOID,
  29. LPWSTR wszSOMID,
  30. LPWSTR wszRSOPGPOID,
  31. DWORD cOrder );
  32. //
  33. // Updates matching RSOP_ScriptPolicySetting
  34. //
  35. HRESULT
  36. Update( PRSOP_ScriptList pList,
  37. LPCWSTR wszGPOID,
  38. LPCWSTR wszSOMID );
  39. //
  40. // Deletes all RSOP_ScriptPolicySetting of RSOP_ScriptList type
  41. //
  42. HRESULT
  43. Delete( PRSOP_ScriptList pList );
  44. private:
  45. LPSAFEARRAY
  46. MakeSafeArrayOfScripts(PRSOP_ScriptList pList);
  47. IUnknown*
  48. PutScriptCommand( LPCWSTR szCommand, LPCWSTR szParams, SYSTEMTIME* pExecTime );
  49. //
  50. // house keeping
  51. //
  52. BOOL m_bInitialized;
  53. IWbemServices* m_pWbemServices;
  54. XBStr m_xbstrPath;
  55. //
  56. // RSOP_PolicySetting
  57. //
  58. XBStr m_xbstrId;
  59. XBStr m_xbstrName;
  60. XBStr m_xbstrGPO;
  61. XBStr m_xbstrSOM;
  62. XBStr m_xbstrOrderClass;
  63. //
  64. // RSOP_ScriptPolicySetting
  65. //
  66. XBStr m_xbstrScriptPolicySetting;
  67. XInterface<IWbemClassObject> m_xScriptPolicySetting;
  68. XInterface<IWbemClassObject> m_pInstance;
  69. XBStr m_xbstrScriptType;
  70. XBStr m_xbstrScriptList;
  71. XBStr m_xbstrOrder;
  72. //
  73. // RSOP_ScriptCmd
  74. //
  75. XBStr m_xbstrScriptCommand;
  76. XInterface<IWbemClassObject> m_xScriptCommand;
  77. XBStr m_xbstrScript;
  78. XBStr m_xbstrArguments;
  79. XBStr m_xbstrExecutionTime;
  80. };
  81. #endif // !_SCRIPTLOG_H_