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.

149 lines
4.0 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998
  5. //
  6. // File: ScrptLog.h
  7. //
  8. // Contents:
  9. //
  10. // History: 9-Aug-99 NishadM Created
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef _SCRPTLOG_H_
  14. #define _SCRPTLOG_H_
  15. #include <wbemcli.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. //
  20. // handle
  21. //
  22. typedef void* RSOPScriptList;
  23. //
  24. // script type strings
  25. //
  26. #define LOGON_VALUE L"Logon"
  27. #define LOGOFF_VALUE L"Logoff"
  28. #define STARTUP_VALUE L"Startup"
  29. #define SHUTDOWN_VALUE L"Shutdown"
  30. #define LOGON_SOM_VALUE L"Logon-SOMIDs"
  31. #define LOGOFF_SOM_VALUE L"Logoff-SOMIDs"
  32. #define STARTUP_SOM_VALUE L"Startup-SOMIDs"
  33. #define SHUTDOWN_SOM_VALUE L"Shutdown-SOMIDs"
  34. #define LOGON_NS_VALUE L"User-RSoP-NS"
  35. #define LOGOFF_NS_VALUE L"User-RSoP-NS"
  36. #define STARTUP_NS_VALUE L"Mach-RSoP-NS"
  37. #define SHUTDOWN_NS_VALUE L"Mach-RSoP-NS"
  38. #define LOGON_RSOP_LOGGING_VALUE L"Logon-RSoP-Logging"
  39. #define LOGOFF_RSOP_LOGGING_VALUE L"Logoff-RSoP-Logging"
  40. #define STARTUP_RSOP_LOGGING_VALUE L"Startup-RSoP-Logging"
  41. #define SHUTDOWN_RSOP_LOGGING_VALUE L"Shutdown-RSoP-Logging"
  42. //
  43. // Script List creation APIs
  44. //
  45. RSOPScriptList
  46. CreateScriptListOfStr( LPCWSTR szScriptType );
  47. //
  48. // Script list destructor API
  49. //
  50. void
  51. DestroyScriptList( RSOPScriptList pList );
  52. //
  53. // Script list building API
  54. //
  55. BOOL
  56. AddScript( RSOPScriptList pList, LPCWSTR szCommand, LPCWSTR szParams, SYSTEMTIME* execTime );
  57. //
  58. // Misc. APIs
  59. //
  60. HRESULT
  61. LogScriptsRsopData( RSOPScriptList pScriptList,
  62. IWbemServices* pWbemServices,
  63. LPCWSTR wszGPOID,
  64. LPCWSTR wszSOMID,
  65. LPCWSTR wszRSOPGPOID,
  66. DWORD cOrder );
  67. HRESULT
  68. DeleteScriptsRsopData( RSOPScriptList pScriptList,
  69. IWbemServices* pWbemServices );
  70. HRESULT
  71. UpdateScriptsRsopData( RSOPScriptList pScriptList,
  72. IWbemServices* pWbemServices,
  73. LPCWSTR wszGPOID,
  74. LPCWSTR wszSOMID );
  75. LPWSTR
  76. GPOIDFromPath( LPCWSTR wszPath );
  77. LPWSTR
  78. GetNamespace( IWbemServices* pWbemServices );
  79. //
  80. // delay load
  81. //
  82. #define RSOP_SCRIPT_LOG_DLL L"gptext.dll"
  83. typedef RSOPScriptList (*PFNCREATESCRIPTLISTOFSTR)( LPCWSTR );
  84. typedef void (*PFNDESTROYSCRIPTLIST)( RSOPScriptList );
  85. typedef BOOL (*PFNADDSCRIPT)( RSOPScriptList, LPCWSTR, LPCWSTR );
  86. typedef BOOL (*PFNRSOPLOGGINGENABLED)();
  87. typedef HRESULT (*PFNLOGSCRIPTSRSOPDATA)( RSOPScriptList, IWbemServices*, LPCWSTR, LPCWSTR, LPCWSTR, DWORD );
  88. typedef HRESULT (*PFNDELETESCRIPTSRSOPDATA)(RSOPScriptList, IWbemServices*);
  89. typedef HRESULT (*PFNUPDATESCRIPTSRSOPDATA)( RSOPScriptList, IWbemServices*, LPCWSTR, LPCWSTR );
  90. typedef LPWSTR (*PFNGPOIDFROMPATH)( LPCWSTR );
  91. typedef LPWSTR (*PFNGETNAMESPACE)( IWbemServices* );
  92. typedef struct _SCRPTLOG_API
  93. {
  94. HINSTANCE hInstance;
  95. PFNCREATESCRIPTLISTOFSTR pfnCreateScriptListOfStr;
  96. PFNDESTROYSCRIPTLIST pfnDestroyScriptList;
  97. PFNADDSCRIPT pfnAddScript;
  98. PFNLOGSCRIPTSRSOPDATA pfnLogScriptsRsopData;
  99. PFNDELETESCRIPTSRSOPDATA pfnDeleteScriptsRsopData;
  100. PFNUPDATESCRIPTSRSOPDATA pfnUpdateScriptsRsopData;
  101. PFNGPOIDFROMPATH pfnGPOIDFromPath;
  102. PFNGETNAMESPACE pfnGetNamespace;
  103. } SCRPTLOG_API, *PSCRPTLOG_API;
  104. //
  105. // API names
  106. //
  107. #define DESTROYSCRIPTLIST "DestroyScriptList"
  108. #define DELETESCRIPTSRSOPDATA "DeleteScriptsRsopData"
  109. #define CREATESCRIPTLISTOFSTR "CreateScriptListOfStr"
  110. #define ADDSCRIPT "AddScript"
  111. #define LOGSCRIPTSRSOPDATA "LogScriptsRsopData"
  112. #define UPDATESCRIPTSRSOPDATA "UpdateScriptsRsopData"
  113. #define GPOIDFROMPATH "GPOIDFromPath"
  114. #define GETNAMESPACE "GetNamespace"
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif // _SCRPTLOG_H_