ihost.idl 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /*
  2. * Copyright 2010 Jacek Caban for CodeWeavers
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. #pragma makedep typelib
  19. #include "ihost_dispid.h"
  20. import "oaidl.idl";
  21. [
  22. uuid(60254ca0-953b-11cf-8c96-00aa00b8708c),
  23. version(5.6),
  24. ]
  25. library IHost
  26. {
  27. importlib("stdole2.tlb");
  28. [
  29. odl,
  30. uuid(2cc5a9d1-b1e5-11d3-a286-00104bd35090),
  31. dual,
  32. oleautomation
  33. ]
  34. interface IArguments2 : IDispatch {
  35. [id(DISPID_VALUE)]
  36. HRESULT Item(
  37. [in] LONG Index,
  38. [out, retval] BSTR *out_Value);
  39. [id(IARGUMENTS2_COUNT_DISPID)]
  40. HRESULT Count([out, retval] LONG *out_Count);
  41. [id(IARGUMENTS2_LENGTH_DISPID), propget]
  42. HRESULT length([out, retval] LONG *out_Count);
  43. }
  44. [
  45. odl,
  46. uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
  47. hidden,
  48. dual,
  49. nonextensible,
  50. oleautomation
  51. ]
  52. interface ITextStream : IDispatch {
  53. [id(ITEXTSTREAM_LINE_DISPID), propget]
  54. HRESULT Line([out, retval] LONG *Line);
  55. [id(ITEXTSTREAM_COLUMN_DISPID), propget]
  56. HRESULT Column([out, retval] LONG *Column);
  57. [id(ITEXTSTREAM_ATENDOFSTREAM_DISPID), propget]
  58. HRESULT AtEndOfStream([out, retval] VARIANT_BOOL *EOS);
  59. [id(ITEXTSTREAM_ATENDOFLINE_DISPID), propget]
  60. HRESULT AtEndOfLine([out, retval] VARIANT_BOOL *EOL);
  61. [id(ITEXTSTREAM_READ_DISPID)]
  62. HRESULT Read(
  63. [in] LONG Characters,
  64. [out, retval] BSTR *Text);
  65. [id(ITEXTSTREAM_READLINE_DISPID)]
  66. HRESULT ReadLine([out, retval] BSTR *Text);
  67. [id(ITEXTSTREAM_READALL_DISPID)]
  68. HRESULT ReadAll([out, retval] BSTR *Text);
  69. [id(ITEXTSTREAM_WRITE_DISPID)]
  70. HRESULT Write([in] BSTR Text);
  71. [id(ITEXTSTREAM_WRITELINE_DISPID)]
  72. HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
  73. [id(ITEXTSTREAM_WRITEBLANKLINES_DISPID)]
  74. HRESULT WriteBlankLines([in] LONG Lines);
  75. [id(ITEXTSTREAM_SKIP_DISPID)]
  76. HRESULT Skip([in] LONG Characters);
  77. [id(ITEXTSTREAM_SKIPLINE_DISPID)]
  78. HRESULT SkipLine();
  79. [id(ITEXTSTREAM_CLOSE_DISPID)]
  80. HRESULT Close();
  81. }
  82. [
  83. odl,
  84. uuid(91afbd1b-5feb-43f5-b028-e2ca960617ec),
  85. dual,
  86. oleautomation
  87. ]
  88. interface IHost : IDispatch {
  89. [id(IHOST_NAME_DISPID), propget]
  90. HRESULT Name([out, retval] BSTR *out_Name);
  91. [id(IHOST_APPLICATION_DISPID), propget]
  92. HRESULT Application([out, retval] IDispatch **out_Dispatch);
  93. [id(IHOST_FULLNAME_DISPID), propget]
  94. HRESULT FullName([out, retval] BSTR *out_Path);
  95. [id(IHOST_PATH_DISPID), propget]
  96. HRESULT Path([out, retval] BSTR* out_Path);
  97. [id(IHOST_INTERACTIVE_DISPID), propget]
  98. HRESULT Interactive([out, retval] VARIANT_BOOL *out_Interactive);
  99. [id(IHOST_INTERACTIVE_DISPID), propput]
  100. HRESULT Interactive([in] VARIANT_BOOL out_Interactive);
  101. [id(IHOST_QUIT_DISPID)]
  102. HRESULT Quit([in, optional, defaultvalue(0)] int ExitCode);
  103. [id(IHOST_SCRIPTNAME_DISPID), propget]
  104. HRESULT ScriptName([out, retval] BSTR *out_ScriptName);
  105. [id(IHOST_SCRIPTFULLNAME_DISPID), propget]
  106. HRESULT ScriptFullName([out, retval] BSTR* out_ScriptFullName);
  107. [id(IHOST_ARGUMENTS_DISPID), propget]
  108. HRESULT Arguments([out, retval] IArguments2 **out_Arguments);
  109. [id(IHOST_VERSION_DISPID), propget]
  110. HRESULT Version([out, retval] BSTR *out_Version);
  111. [id(IHOST_BUILDVERSION_DISPID), propget]
  112. HRESULT BuildVersion([out, retval] int *out_Build);
  113. [id(IHOST_TIMEOUT_DISPID), propget]
  114. HRESULT Timeout([out, retval] LONG *out_Timeout);
  115. [id(IHOST_TIMEOUT_DISPID), propput]
  116. HRESULT Timeout([in] LONG out_Timeout);
  117. [id(IHOST_CREATEOBJECT_DISPID)]
  118. HRESULT CreateObject(
  119. [in] BSTR ProgID,
  120. [in, optional, defaultvalue("")] BSTR Prefix,
  121. [out, retval] IDispatch **out_Dispatch);
  122. [id(IHOST_ECHO_DISPID), vararg]
  123. HRESULT Echo([in] SAFEARRAY(VARIANT) pArgs);
  124. [id(IHOST_GETOBJECT_DISPID)]
  125. HRESULT GetObject(
  126. [in] BSTR Pathname,
  127. [in, optional, defaultvalue("")] BSTR ProgID,
  128. [in, optional, defaultvalue("")] BSTR Prefix,
  129. [out, retval] IDispatch **out_Dispatch);
  130. [id(IHOST_DISCONNECTOBJECT_DISPID)]
  131. HRESULT DisconnectObject([in] IDispatch *Object);
  132. [id(IHOST_SLEEP_DISPID)]
  133. HRESULT Sleep([in] LONG Time);
  134. [id(IHOST_CONNECTOBJECT_DISPID)]
  135. HRESULT ConnectObject(
  136. [in] IDispatch *Object,
  137. [in] BSTR Prefix);
  138. [id(IHOST_STDIN_DISPID), propget]
  139. HRESULT StdIn([out, retval] ITextStream **out_ppts);
  140. [id(IHOST_STDOUT_DISPID), propget]
  141. HRESULT StdOut([out, retval] ITextStream **ppts);
  142. [id(IHOST_STDERR_DISPID), propget]
  143. HRESULT StdErr([out, retval] ITextStream **ppts);
  144. }
  145. }