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.

121 lines
3.2 KiB

  1. /*++=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. scrrun.idl
  5. Abstract:
  6. Generates typelib and COM interface definitions for ScriptObject's
  7. runtime interface.
  8. Author:
  9. Paul M Midgen (pmidge) 22-February-2001
  10. Revision History:
  11. 22-February-2001 pmidge
  12. Created
  13. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--*/
  14. #include "..\inc\dispids.h"
  15. [
  16. uuid(7bf735b7-0798-11d5-b5f6-00005a990a0c),
  17. helpstring("Spork MBT Controller Script Runtime Type Library"),
  18. lcid(0x0000),
  19. version(1.0)
  20. ]
  21. library ScriptRuntime
  22. {
  23. importlib ("stdole32.tlb");
  24. importlib ("stdole2.tlb");
  25. // =================================== IScriptRuntime ===================================
  26. // CreateObject flags for Mode param
  27. const int CO_MODE_CREATENEW = 0x01;
  28. const int CO_MODE_DONTCACHE = 0x02;
  29. const int CO_MODE_NONAMEDOBJECT = 0x04;
  30. [
  31. uuid(7bf735bb-0798-11d5-b5f6-00005a990a0c),
  32. object, local, dual,
  33. nonextensible,
  34. helpstring("IScriptRuntime Interface"),
  35. pointer_default(unique)
  36. ]
  37. interface IScriptRuntime : IDispatch
  38. {
  39. [
  40. id(DISPID_SCRRUN_CREATEOBJECT),
  41. helpstring("creates new objects")
  42. ]
  43. HRESULT CreateObject(
  44. [in] BSTR ProgId,
  45. [in, optional] VARIANT* Name,
  46. [in, optional] VARIANT* Mode,
  47. [out, retval] VARIANT* Object
  48. );
  49. [
  50. id(DISPID_SCRRUN_CREATEFORK),
  51. helpstring("forks execution to a new script")
  52. ]
  53. HRESULT CreateFork(
  54. [in] BSTR ScriptFile,
  55. [in] VARIANT Threads,
  56. [in] BSTR ChildParams,
  57. [out, retval] VARIANT* ChildResult
  58. );
  59. [
  60. id(DISPID_SCRRUN_PUTVALUE),
  61. helpstring("stores a named value")
  62. ]
  63. HRESULT PutValue(
  64. [in] BSTR Name,
  65. [in, optional] VARIANT* Value,
  66. [out, retval] VARIANT* Status
  67. );
  68. [
  69. id(DISPID_SCRRUN_GETVALUE),
  70. helpstring("retrieves a named value")
  71. ]
  72. HRESULT GetValue(
  73. [in] BSTR Name,
  74. [out, retval] VARIANT* Value
  75. );
  76. [
  77. id(DISPID_SCRRUN_SETUSERID),
  78. helpstring("allows the script to run as a specific user")
  79. ]
  80. HRESULT SetUserId(
  81. [in] VARIANT Username,
  82. [in] VARIANT Password,
  83. [in, optional] VARIANT* Domain,
  84. [out, retval] VARIANT* Status
  85. );
  86. };
  87. // ======================================================================================
  88. // ===================================== coclasses ======================================
  89. [
  90. uuid(7bf735ba-0798-11d5-b5f6-00005a990a0c),
  91. helpstring("ScriptRuntime class")
  92. ]
  93. coclass ScriptRuntime
  94. {
  95. [default] interface IScriptRuntime;
  96. };
  97. // ======================================================================================
  98. }