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.

891 lines
28 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // (C) Copyright 2000 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // Contents: Declarations for ActiveX Scripting host applications and script engines
  6. //
  7. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  8. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  9. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  10. // PARTICULAR PURPOSE.
  11. //
  12. //----------------------------------------------------------------------------
  13. cpp_quote("//=--------------------------------------------------------------------------=")
  14. cpp_quote("// ActivScp.h")
  15. cpp_quote("//=--------------------------------------------------------------------------=")
  16. cpp_quote("// (C) Copyright 2000 Microsoft Corporation. All Rights Reserved.")
  17. cpp_quote("//")
  18. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  19. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  20. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  21. cpp_quote("// PARTICULAR PURPOSE.")
  22. cpp_quote("//=--------------------------------------------------------------------------=")
  23. cpp_quote("//")
  24. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  25. cpp_quote("//")
  26. cpp_quote("// Declarations for ActiveX Scripting host applications and script engines.")
  27. cpp_quote("//")
  28. cpp_quote("")
  29. cpp_quote("#ifndef __ActivScp_h")
  30. cpp_quote("#define __ActivScp_h")
  31. cpp_quote("")
  32. #ifndef DO_NO_IMPORTS
  33. import "ocidl.idl";
  34. import "oleidl.idl";
  35. import "oaidl.idl";
  36. #endif
  37. #ifdef USER_TYPES
  38. #define HWND UserHWND
  39. #define BSTR UserBSTR
  40. #define EXCEPINFO UserEXCEPINFO
  41. #define VARIANT UserVARIANT
  42. #endif
  43. cpp_quote("/* GUIDs")
  44. cpp_quote(" ********/")
  45. cpp_quote("")
  46. cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
  47. cpp_quote("// {F0B7A1A1-9847-11cf-8F20-00805F2CD064}")
  48. cpp_quote("DEFINE_GUID(CATID_ActiveScript, 0xf0b7a1a1, 0x9847, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  49. cpp_quote("")
  50. cpp_quote("// {F0B7A1A2-9847-11cf-8F20-00805F2CD064}")
  51. cpp_quote("DEFINE_GUID(CATID_ActiveScriptParse, 0xf0b7a1a2, 0x9847, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  52. cpp_quote("")
  53. cpp_quote("// {F0B7A1A3-9847-11cf-8F20-00805F2CD064}")
  54. cpp_quote("DEFINE_GUID(CATID_ActiveScriptEncode, 0xf0b7a1a3, 0x9847, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  55. cpp_quote("")
  56. cpp_quote("// {BB1A2AE1-A4F9-11cf-8F20-00805F2CD064}")
  57. cpp_quote("DEFINE_GUID(IID_IActiveScript, 0xbb1a2ae1, 0xa4f9, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  58. cpp_quote("")
  59. cpp_quote("// {BB1A2AE2-A4F9-11cf-8F20-00805F2CD064}")
  60. cpp_quote("DEFINE_GUID(IID_IActiveScriptParse32, 0xbb1a2ae2, 0xa4f9, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  61. cpp_quote("// {C7EF7658-E1EE-480E-97EA-D52CB4D76D17}")
  62. cpp_quote("DEFINE_GUID(IID_IActiveScriptParse64, 0xc7ef7658, 0xe1ee, 0x480e, 0x97, 0xea, 0xd5, 0x2c, 0xb4, 0xd7, 0x6d, 0x17);")
  63. cpp_quote("")
  64. cpp_quote("// {BB1A2AE3-A4F9-11cf-8F20-00805F2CD064}")
  65. cpp_quote("DEFINE_GUID(IID_IActiveScriptEncode, 0xbb1a2ae3, 0xa4f9, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  66. cpp_quote("")
  67. cpp_quote("// {BEE9B76E-CFE3-11d1-B747-00C04FC2B085}")
  68. cpp_quote("DEFINE_GUID(IID_IActiveScriptHostEncode, 0xbee9b76e, 0xcfe3, 0x11d1, 0xb7, 0x47, 0x00, 0xc0, 0x4f, 0xc2, 0xb0, 0x85);")
  69. cpp_quote("")
  70. cpp_quote("// {1CFF0050-6FDD-11d0-9328-00A0C90DCAA9}")
  71. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedureOld32, 0x1cff0050, 0x6fdd, 0x11d0, 0x93, 0x28, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9);")
  72. cpp_quote("// {21F57128-08C9-4638-BA12-22D15D88DC5C}")
  73. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedureOld64, 0x21f57128, 0x08c9, 0x4638, 0xba, 0x12, 0x22, 0xd1, 0x5d, 0x88, 0xdc, 0x5c);")
  74. cpp_quote("")
  75. cpp_quote("// {AA5B6A80-B834-11d0-932F-00A0C90DCAA9}")
  76. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedure32, 0xaa5b6a80, 0xb834, 0x11d0, 0x93, 0x2f, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9);")
  77. cpp_quote("// {C64713B6-E029-4CC5-9200-438B72890B6A}")
  78. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedure64, 0xc64713b6, 0xe029, 0x4cc5, 0x92, 0x00, 0x43, 0x8b, 0x72, 0x89, 0x0b, 0x6a);")
  79. cpp_quote("")
  80. cpp_quote("// {71EE5B20-FB04-11d1-B3A8-00A0C911E8B2}")
  81. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedure2_32, 0x71ee5b20, 0xfb04, 0x11d1, 0xb3, 0xa8, 0x00, 0xa0, 0xc9, 0x11, 0xe8, 0xb2);")
  82. cpp_quote("// {FE7C4271-210C-448D-9F54-76DAB7047B28}")
  83. cpp_quote("DEFINE_GUID(IID_IActiveScriptParseProcedure2_64, 0xfe7c4271, 0x210c, 0x448d, 0x9f, 0x54, 0x76, 0xda, 0xb7, 0x04, 0x7b, 0x28);")
  84. cpp_quote("")
  85. cpp_quote("// {DB01A1E3-A42B-11cf-8F20-00805F2CD064}")
  86. cpp_quote("DEFINE_GUID(IID_IActiveScriptSite, 0xdb01a1e3, 0xa42b, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  87. cpp_quote("")
  88. cpp_quote("// {D10F6761-83E9-11cf-8F20-00805F2CD064}")
  89. cpp_quote("DEFINE_GUID(IID_IActiveScriptSiteWindow, 0xd10f6761, 0x83e9, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  90. cpp_quote("")
  91. cpp_quote("// {539698A0-CDCA-11CF-A5EB-00AA0047A063}")
  92. cpp_quote("DEFINE_GUID(IID_IActiveScriptSiteInterruptPoll, 0x539698a0, 0xcdca, 0x11cf, 0xa5, 0xeb, 0x00, 0xaa, 0x00, 0x47, 0xa0, 0x63);")
  93. cpp_quote("")
  94. cpp_quote("// {EAE1BA61-A4ED-11cf-8F20-00805F2CD064}")
  95. cpp_quote("DEFINE_GUID(IID_IActiveScriptError, 0xeae1ba61, 0xa4ed, 0x11cf, 0x8f, 0x20, 0x00, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  96. cpp_quote("// {B21FB2A1-5B8F-4963-8C21-21450F84ED7F}")
  97. cpp_quote("DEFINE_GUID(IID_IActiveScriptError64, 0xb21fb2a1, 0x5b8f, 0x4963, 0x8c, 0x21, 0x21, 0x45, 0x0f, 0x84, 0xed, 0x7f);")
  98. cpp_quote("")
  99. cpp_quote("// {63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9}")
  100. cpp_quote("DEFINE_GUID(IID_IBindEventHandler, 0x63cdbcb0, 0xc1b1, 0x11d0, 0x93, 0x36, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9);")
  101. cpp_quote("")
  102. cpp_quote("// {B8DA6310-E19B-11d0-933C-00A0C90DCAA9}")
  103. cpp_quote("DEFINE_GUID(IID_IActiveScriptStats, 0xb8da6310, 0xe19b, 0x11d0, 0x93, 0x3c, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9);")
  104. cpp_quote("")
  105. cpp_quote("// {4954E0D0-FBC7-11D1-8410-006008C3FBFC}")
  106. cpp_quote("DEFINE_GUID(IID_IActiveScriptProperty, 0x4954E0D0, 0xFBC7, 0x11D1, 0x84, 0x10, 0x00, 0x60, 0x08, 0xC3, 0xFB, 0xFC);")
  107. cpp_quote("")
  108. cpp_quote("// {1DC9CA50-06EF-11d2-8415-006008C3FBFC}")
  109. cpp_quote("DEFINE_GUID(IID_ITridentEventSink, 0x1dc9ca50, 0x6ef, 0x11d2, 0x84, 0x15, 0x00, 0x60, 0x08, 0xc3, 0xfb, 0xfc);")
  110. cpp_quote("")
  111. cpp_quote("// {6AA2C4A0-2B53-11d4-A2A0-00104BD35090}")
  112. cpp_quote("DEFINE_GUID(IID_IActiveScriptGarbageCollector, 0x6aa2c4a0, 0x2b53, 0x11d4, 0xa2, 0xa0, 0x00, 0x10, 0x4b, 0xd3, 0x50, 0x90);")
  113. cpp_quote("")
  114. cpp_quote("// {764651D0-38DE-11d4-A2A3-00104BD35090}")
  115. cpp_quote("DEFINE_GUID(IID_IActiveScriptSIPInfo, 0x764651d0, 0x38de, 0x11d4, 0xa2, 0xa3, 0x00, 0x10, 0x4b, 0xd3, 0x50, 0x90);")
  116. cpp_quote("")
  117. cpp_quote("// {1629F04E-2799-4db5-8FE5-ACE10F17EBAB}")
  118. cpp_quote("DEFINE_GUID(OID_VBSSIP, 0x1629f04e, 0x2799, 0x4db5, 0x8f, 0xe5, 0xac, 0xe1, 0x0f, 0x17, 0xeb, 0xab);")
  119. cpp_quote("")
  120. cpp_quote("// {06C9E010-38CE-11d4-A2A3-00104BD35090}")
  121. cpp_quote("DEFINE_GUID(OID_JSSIP, 0x6c9e010, 0x38ce, 0x11d4, 0xa2, 0xa3, 0x00, 0x10, 0x4b, 0xd3, 0x50, 0x90);")
  122. cpp_quote("")
  123. cpp_quote("// {1A610570-38CE-11d4-A2A3-00104BD35090}")
  124. cpp_quote("DEFINE_GUID(OID_WSFSIP, 0x1a610570, 0x38ce, 0x11d4, 0xa2, 0xa3, 0x00, 0x10, 0x4b, 0xd3, 0x50, 0x90);")
  125. cpp_quote("")
  126. cpp_quote("#endif // _NO_SCRIPT_GUIDS")
  127. cpp_quote("")
  128. cpp_quote("// Constants used by ActiveX Scripting:")
  129. cpp_quote("//")
  130. cpp_quote("")
  131. cpp_quote("/* IActiveScript::AddNamedItem() input flags */")
  132. cpp_quote("")
  133. cpp_quote("#define SCRIPTITEM_ISVISIBLE 0x00000002")
  134. cpp_quote("#define SCRIPTITEM_ISSOURCE 0x00000004")
  135. cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS 0x00000008")
  136. cpp_quote("#define SCRIPTITEM_ISPERSISTENT 0x00000040")
  137. cpp_quote("#define SCRIPTITEM_CODEONLY 0x00000200")
  138. cpp_quote("#define SCRIPTITEM_NOCODE 0x00000400")
  139. cpp_quote("")
  140. cpp_quote("#define SCRIPTITEM_ALL_FLAGS (SCRIPTITEM_ISSOURCE | \\")
  141. cpp_quote(" SCRIPTITEM_ISVISIBLE | \\")
  142. cpp_quote(" SCRIPTITEM_ISPERSISTENT | \\")
  143. cpp_quote(" SCRIPTITEM_GLOBALMEMBERS | \\")
  144. cpp_quote(" SCRIPTITEM_NOCODE | \\")
  145. cpp_quote(" SCRIPTITEM_CODEONLY)")
  146. cpp_quote("")
  147. cpp_quote("/* IActiveScript::AddTypeLib() input flags */")
  148. cpp_quote("")
  149. cpp_quote("#define SCRIPTTYPELIB_ISCONTROL 0x00000010")
  150. cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT 0x00000040")
  151. cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS (SCRIPTTYPELIB_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
  152. cpp_quote("")
  153. cpp_quote("/* IActiveScriptParse::AddScriptlet() and IActiveScriptParse::ParseScriptText() input flags */")
  154. cpp_quote("")
  155. cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION 0x00000001")
  156. cpp_quote("#define SCRIPTTEXT_ISVISIBLE 0x00000002")
  157. cpp_quote("#define SCRIPTTEXT_ISEXPRESSION 0x00000020")
  158. cpp_quote("#define SCRIPTTEXT_ISPERSISTENT 0x00000040")
  159. cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE 0x00000080")
  160. cpp_quote("#define SCRIPTTEXT_ALL_FLAGS (SCRIPTTEXT_DELAYEXECUTION | \\")
  161. cpp_quote(" SCRIPTTEXT_ISVISIBLE | \\")
  162. cpp_quote(" SCRIPTTEXT_ISEXPRESSION | \\")
  163. cpp_quote(" SCRIPTTEXT_ISPERSISTENT | \\")
  164. cpp_quote(" SCRIPTTEXT_HOSTMANAGESSOURCE)")
  165. cpp_quote("")
  166. cpp_quote("/* IActiveScriptParseProcedure::ParseProcedureText() input flags */")
  167. cpp_quote("")
  168. cpp_quote("#define SCRIPTPROC_ISEXPRESSION 0x00000020")
  169. cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE 0x00000080")
  170. cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS 0x00000100")
  171. cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS 0x00000200")
  172. cpp_quote("#define SCRIPTPROC_ALL_FLAGS (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
  173. cpp_quote(" SCRIPTPROC_ISEXPRESSION | \\")
  174. cpp_quote(" SCRIPTPROC_IMPLICIT_THIS | \\")
  175. cpp_quote(" SCRIPTPROC_IMPLICIT_PARENTS)")
  176. cpp_quote("")
  177. cpp_quote("/* IActiveScriptSite::GetItemInfo() input flags */")
  178. cpp_quote("")
  179. cpp_quote("#define SCRIPTINFO_IUNKNOWN 0x00000001")
  180. cpp_quote("#define SCRIPTINFO_ITYPEINFO 0x00000002")
  181. cpp_quote("#define SCRIPTINFO_ALL_FLAGS (SCRIPTINFO_IUNKNOWN | \\")
  182. cpp_quote(" SCRIPTINFO_ITYPEINFO)")
  183. cpp_quote("")
  184. cpp_quote("/* IActiveScript::Interrupt() Flags */")
  185. cpp_quote("")
  186. cpp_quote("#define SCRIPTINTERRUPT_DEBUG 0x00000001")
  187. cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
  188. cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS (SCRIPTINTERRUPT_DEBUG | \\")
  189. cpp_quote(" SCRIPTINTERRUPT_RAISEEXCEPTION)")
  190. cpp_quote("")
  191. cpp_quote("/* IActiveScriptStats::GetStat() values */")
  192. cpp_quote("")
  193. cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT 1")
  194. cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT 2")
  195. cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME 3")
  196. cpp_quote("#define SCRIPTSTAT_TOTAL_TIME 4")
  197. cpp_quote("")
  198. cpp_quote("/* IActiveScriptEncode::AddSection() input flags */")
  199. cpp_quote("")
  200. cpp_quote("#define SCRIPT_ENCODE_SECTION 0x00000001")
  201. cpp_quote("")
  202. cpp_quote("#define SCRIPT_ENCODE_DEFAULT_LANGUAGE 0x00000001")
  203. cpp_quote("#define SCRIPT_ENCODE_NO_ASP_LANGUAGE 0x00000002")
  204. cpp_quote("")
  205. cpp_quote("/* Properties for IActiveScriptProperty */")
  206. cpp_quote("#define SCRIPTPROP_NAME 0x00000000")
  207. cpp_quote("#define SCRIPTPROP_MAJORVERSION 0x00000001")
  208. cpp_quote("#define SCRIPTPROP_MINORVERSION 0x00000002")
  209. cpp_quote("#define SCRIPTPROP_BUILDNUMBER 0x00000003")
  210. cpp_quote("")
  211. cpp_quote("#define SCRIPTPROP_DELAYEDEVENTSINKING 0x00001000")
  212. cpp_quote("#define SCRIPTPROP_CATCHEXCEPTION 0x00001001")
  213. cpp_quote("#define SCRIPTPROP_CONVERSIONLCID 0x00001002")
  214. cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED 0x00001003")
  215. cpp_quote("")
  216. cpp_quote("#define SCRIPTPROP_DEBUGGER 0x00001100")
  217. cpp_quote("#define SCRIPTPROP_JITDEBUG 0x00001101")
  218. cpp_quote("")
  219. cpp_quote("// These properties are defined and available, but are not")
  220. cpp_quote("// officially supported.")
  221. cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT 0x70000000")
  222. cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK 0x70000001")
  223. cpp_quote("")
  224. typedef enum tagSCRIPTSTATE {
  225. SCRIPTSTATE_UNINITIALIZED = 0,
  226. SCRIPTSTATE_INITIALIZED = 5,
  227. SCRIPTSTATE_STARTED = 1,
  228. SCRIPTSTATE_CONNECTED = 2,
  229. SCRIPTSTATE_DISCONNECTED = 3,
  230. SCRIPTSTATE_CLOSED = 4,
  231. } SCRIPTSTATE ;
  232. cpp_quote("")
  233. cpp_quote("/* script thread state values */")
  234. cpp_quote("")
  235. typedef enum tagSCRIPTTHREADSTATE {
  236. SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
  237. SCRIPTTHREADSTATE_RUNNING = 1,
  238. } SCRIPTTHREADSTATE ;
  239. cpp_quote("")
  240. cpp_quote("/* IActiveScriptCollectGarbage constants */")
  241. cpp_quote("")
  242. typedef enum tagSCRIPTGCTYPE {
  243. SCRIPTGCTYPE_NORMAL = 0,
  244. SCRIPTGCTYPE_EXHAUSTIVE = 1,
  245. } SCRIPTGCTYPE;
  246. cpp_quote("")
  247. cpp_quote("")
  248. cpp_quote("/* Thread IDs */")
  249. cpp_quote("")
  250. typedef DWORD SCRIPTTHREADID;
  251. cpp_quote("")
  252. cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
  253. cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
  254. cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
  255. cpp_quote("")
  256. cpp_quote("/* Structures */")
  257. cpp_quote("")
  258. cpp_quote("/* Interfaces")
  259. cpp_quote(" *************/")
  260. cpp_quote("")
  261. interface IActiveScriptSite;
  262. interface IActiveScriptError;
  263. interface IActiveScriptError64;
  264. interface IActiveScriptSiteWindow;
  265. interface IActiveScriptSiteInterruptPoll;
  266. interface IActiveScript;
  267. interface IActiveScriptParse32;
  268. interface IActiveScriptParse64;
  269. interface IActiveScriptParseProcedureOld32;
  270. interface IActiveScriptParseProcedureOld64;
  271. interface IActiveScriptParseProcedure32;
  272. interface IActiveScriptParseProcedure64;
  273. interface IActiveScriptParseProcedure2_32;
  274. interface IActiveScriptParseProcedure2_64;
  275. interface IActiveScriptEncode;
  276. interface IActiveScriptHostEncode;
  277. interface IBindEventHandler;
  278. interface IActiveScriptStats;
  279. interface IActiveScriptProperty;
  280. interface ITridentEventSink;
  281. interface IActiveScriptGarbageCollector;
  282. interface IActiveScriptSIPInfo;
  283. cpp_quote("")
  284. [
  285. object,
  286. uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
  287. pointer_default(unique)
  288. ]
  289. interface IActiveScriptSite : IUnknown
  290. {
  291. HRESULT GetLCID(
  292. [out] LCID *plcid
  293. );
  294. HRESULT GetItemInfo(
  295. [in] LPCOLESTR pstrName,
  296. [in] DWORD dwReturnMask,
  297. [out] IUnknown **ppiunkItem,
  298. [out] ITypeInfo **ppti
  299. );
  300. HRESULT GetDocVersionString(
  301. [out] BSTR *pbstrVersion
  302. );
  303. HRESULT OnScriptTerminate(
  304. [in] const VARIANT *pvarResult,
  305. [in] const EXCEPINFO *pexcepinfo
  306. );
  307. HRESULT OnStateChange(
  308. [in] SCRIPTSTATE ssScriptState
  309. );
  310. HRESULT OnScriptError(
  311. [in] IActiveScriptError *pscripterror
  312. );
  313. HRESULT OnEnterScript(void);
  314. HRESULT OnLeaveScript(void);
  315. }
  316. [
  317. object,
  318. uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
  319. pointer_default(unique)
  320. ]
  321. interface IActiveScriptError : IUnknown
  322. {
  323. [local]
  324. HRESULT GetExceptionInfo(
  325. [out] EXCEPINFO *pexcepinfo
  326. );
  327. [call_as(GetExceptionInfo)]
  328. HRESULT RemoteGetExceptionInfo(
  329. [out] EXCEPINFO *pexcepinfo
  330. );
  331. HRESULT GetSourcePosition(
  332. [out] DWORD *pdwSourceContext,
  333. [out] ULONG *pulLineNumber,
  334. [out] LONG *plCharacterPosition // -1 --> unknown
  335. );
  336. HRESULT GetSourceLineText(
  337. [out] BSTR *pbstrSourceLine
  338. );
  339. }
  340. [
  341. object,
  342. uuid(B21FB2A1-5B8F-4963-8C21-21450F84ED7F),
  343. pointer_default(unique)
  344. ]
  345. interface IActiveScriptError64 : IActiveScriptError
  346. {
  347. HRESULT GetSourcePosition64(
  348. [out] DWORDLONG *pdwSourceContext,
  349. [out] ULONG *pulLineNumber,
  350. [out] LONG *plCharacterPosition // -1 --> unknown
  351. );
  352. }
  353. [
  354. object,
  355. uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
  356. pointer_default(unique)
  357. ]
  358. interface IActiveScriptSiteWindow : IUnknown
  359. {
  360. HRESULT GetWindow(
  361. [out] HWND *phwnd
  362. );
  363. HRESULT EnableModeless(
  364. [in] BOOL fEnable
  365. );
  366. }
  367. [
  368. object,
  369. uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
  370. pointer_default(unique)
  371. ]
  372. interface IActiveScriptSiteInterruptPoll : IUnknown
  373. {
  374. HRESULT QueryContinue(void);
  375. }
  376. [
  377. object,
  378. uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
  379. pointer_default(unique)
  380. ]
  381. interface IActiveScript : IUnknown{
  382. HRESULT SetScriptSite(
  383. [in] IActiveScriptSite *pass
  384. );
  385. HRESULT GetScriptSite(
  386. [in] REFIID riid,
  387. [out, iid_is(riid)] void **ppvObject
  388. );
  389. HRESULT SetScriptState(
  390. [in] SCRIPTSTATE ss
  391. );
  392. HRESULT GetScriptState(
  393. [out] SCRIPTSTATE *pssState
  394. );
  395. HRESULT Close(void);
  396. HRESULT AddNamedItem(
  397. [in] LPCOLESTR pstrName,
  398. [in] DWORD dwFlags
  399. );
  400. HRESULT AddTypeLib(
  401. [in] REFGUID rguidTypeLib,
  402. [in] DWORD dwMajor,
  403. [in] DWORD dwMinor,
  404. [in] DWORD dwFlags
  405. );
  406. HRESULT GetScriptDispatch(
  407. [in] LPCOLESTR pstrItemName,
  408. [out] IDispatch **ppdisp
  409. );
  410. HRESULT GetCurrentScriptThreadID(
  411. [out] SCRIPTTHREADID *pstidThread
  412. );
  413. HRESULT GetScriptThreadID(
  414. [in] DWORD dwWin32ThreadId,
  415. [out] SCRIPTTHREADID *pstidThread
  416. );
  417. HRESULT GetScriptThreadState(
  418. [in] SCRIPTTHREADID stidThread,
  419. [out] SCRIPTTHREADSTATE *pstsState
  420. );
  421. HRESULT InterruptScriptThread(
  422. [in] SCRIPTTHREADID stidThread,
  423. [in] const EXCEPINFO *pexcepinfo,
  424. [in] DWORD dwFlags
  425. );
  426. HRESULT Clone(
  427. [out] IActiveScript **ppscript
  428. );
  429. }
  430. [
  431. object,
  432. uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
  433. pointer_default(unique)
  434. ]
  435. interface IActiveScriptParse32 : IUnknown
  436. {
  437. HRESULT InitNew(void);
  438. HRESULT AddScriptlet(
  439. [in] LPCOLESTR pstrDefaultName,
  440. [in] LPCOLESTR pstrCode,
  441. [in] LPCOLESTR pstrItemName,
  442. [in] LPCOLESTR pstrSubItemName,
  443. [in] LPCOLESTR pstrEventName,
  444. [in] LPCOLESTR pstrDelimiter,
  445. [in] DWORD dwSourceContextCookie,
  446. [in] ULONG ulStartingLineNumber,
  447. [in] DWORD dwFlags,
  448. [out] BSTR *pbstrName,
  449. [out] EXCEPINFO *pexcepinfo
  450. );
  451. HRESULT ParseScriptText(
  452. [in] LPCOLESTR pstrCode,
  453. [in] LPCOLESTR pstrItemName,
  454. [in] IUnknown *punkContext,
  455. [in] LPCOLESTR pstrDelimiter,
  456. [in] DWORD dwSourceContextCookie,
  457. [in] ULONG ulStartingLineNumber,
  458. [in] DWORD dwFlags,
  459. [out] VARIANT *pvarResult,
  460. [out] EXCEPINFO *pexcepinfo
  461. );
  462. }
  463. [
  464. object,
  465. uuid(C7EF7658-E1EE-480E-97EA-D52CB4D76D17),
  466. pointer_default(unique)
  467. ]
  468. interface IActiveScriptParse64 : IUnknown
  469. {
  470. HRESULT InitNew(void);
  471. HRESULT AddScriptlet(
  472. [in] LPCOLESTR pstrDefaultName,
  473. [in] LPCOLESTR pstrCode,
  474. [in] LPCOLESTR pstrItemName,
  475. [in] LPCOLESTR pstrSubItemName,
  476. [in] LPCOLESTR pstrEventName,
  477. [in] LPCOLESTR pstrDelimiter,
  478. [in] DWORDLONG dwSourceContextCookie,
  479. [in] ULONG ulStartingLineNumber,
  480. [in] DWORD dwFlags,
  481. [out] BSTR *pbstrName,
  482. [out] EXCEPINFO *pexcepinfo
  483. );
  484. HRESULT ParseScriptText(
  485. [in] LPCOLESTR pstrCode,
  486. [in] LPCOLESTR pstrItemName,
  487. [in] IUnknown *punkContext,
  488. [in] LPCOLESTR pstrDelimiter,
  489. [in] DWORDLONG dwSourceContextCookie,
  490. [in] ULONG ulStartingLineNumber,
  491. [in] DWORD dwFlags,
  492. [out] VARIANT *pvarResult,
  493. [out] EXCEPINFO *pexcepinfo
  494. );
  495. }
  496. cpp_quote("#ifdef _WIN64")
  497. cpp_quote("#define IActiveScriptParse IActiveScriptParse64")
  498. cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse64")
  499. cpp_quote("#else")
  500. cpp_quote("#define IActiveScriptParse IActiveScriptParse32")
  501. cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse32")
  502. cpp_quote("#endif")
  503. cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
  504. cpp_quote("")
  505. [
  506. object,
  507. uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
  508. pointer_default(unique)
  509. ]
  510. interface IActiveScriptParseProcedureOld32 : IUnknown
  511. {
  512. HRESULT ParseProcedureText(
  513. [in] LPCOLESTR pstrCode,
  514. [in] LPCOLESTR pstrFormalParams,
  515. [in] LPCOLESTR pstrItemName,
  516. [in] IUnknown *punkContext,
  517. [in] LPCOLESTR pstrDelimiter,
  518. [in] DWORD dwSourceContextCookie,
  519. [in] ULONG ulStartingLineNumber,
  520. [in] DWORD dwFlags,
  521. [out] IDispatch **ppdisp
  522. );
  523. }
  524. [
  525. object,
  526. uuid(21F57128-08C9-4638-BA12-22D15D88DC5C),
  527. pointer_default(unique)
  528. ]
  529. interface IActiveScriptParseProcedureOld64 : IUnknown
  530. {
  531. HRESULT ParseProcedureText(
  532. [in] LPCOLESTR pstrCode,
  533. [in] LPCOLESTR pstrFormalParams,
  534. [in] LPCOLESTR pstrItemName,
  535. [in] IUnknown *punkContext,
  536. [in] LPCOLESTR pstrDelimiter,
  537. [in] DWORDLONG dwSourceContextCookie,
  538. [in] ULONG ulStartingLineNumber,
  539. [in] DWORD dwFlags,
  540. [out] IDispatch **ppdisp
  541. );
  542. }
  543. cpp_quote("#ifdef _WIN64")
  544. cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld64")
  545. cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld64")
  546. cpp_quote("#else")
  547. cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld32")
  548. cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld32")
  549. cpp_quote("#endif")
  550. cpp_quote("typedef IActiveScriptParseProcedureOld *PIActiveScriptParseProcedureOld;")
  551. [
  552. object,
  553. uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
  554. pointer_default(unique)
  555. ]
  556. interface IActiveScriptParseProcedure32 : IUnknown
  557. {
  558. HRESULT ParseProcedureText(
  559. [in] LPCOLESTR pstrCode,
  560. [in] LPCOLESTR pstrFormalParams,
  561. [in] LPCOLESTR pstrProcedureName,
  562. [in] LPCOLESTR pstrItemName,
  563. [in] IUnknown *punkContext,
  564. [in] LPCOLESTR pstrDelimiter,
  565. [in] DWORD dwSourceContextCookie,
  566. [in] ULONG ulStartingLineNumber,
  567. [in] DWORD dwFlags,
  568. [out] IDispatch **ppdisp
  569. );
  570. }
  571. [
  572. object,
  573. uuid(C64713B6-E029-4CC5-9200-438B72890B6A),
  574. pointer_default(unique)
  575. ]
  576. interface IActiveScriptParseProcedure64 : IUnknown
  577. {
  578. HRESULT ParseProcedureText(
  579. [in] LPCOLESTR pstrCode,
  580. [in] LPCOLESTR pstrFormalParams,
  581. [in] LPCOLESTR pstrProcedureName,
  582. [in] LPCOLESTR pstrItemName,
  583. [in] IUnknown *punkContext,
  584. [in] LPCOLESTR pstrDelimiter,
  585. [in] DWORDLONG dwSourceContextCookie,
  586. [in] ULONG ulStartingLineNumber,
  587. [in] DWORD dwFlags,
  588. [out] IDispatch **ppdisp
  589. );
  590. }
  591. cpp_quote("#ifdef _WIN64")
  592. cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure64")
  593. cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure64")
  594. cpp_quote("#else")
  595. cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure32")
  596. cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure32")
  597. cpp_quote("#endif")
  598. cpp_quote("typedef IActiveScriptParseProcedure *PIActiveScriptParseProcedure;")
  599. [
  600. object,
  601. uuid(71EE5B20-FB04-11d1-B3A8-00A0C911E8B2),
  602. pointer_default(unique)
  603. ]
  604. interface IActiveScriptParseProcedure2_32 : IActiveScriptParseProcedure32
  605. {}
  606. [
  607. object,
  608. uuid(FE7C4271-210C-448D-9F54-76DAB7047B28),
  609. pointer_default(unique)
  610. ]
  611. interface IActiveScriptParseProcedure2_64 : IActiveScriptParseProcedure64
  612. {}
  613. cpp_quote("#ifdef _WIN64")
  614. cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_64")
  615. cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_64")
  616. cpp_quote("#else")
  617. cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_32")
  618. cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_32")
  619. cpp_quote("#endif")
  620. cpp_quote("typedef IActiveScriptParseProcedure2 *PIActiveScriptParseProcedure2;")
  621. [
  622. object,
  623. uuid(BB1A2AE3-A4F9-11cf-8F20-00805F2CD064),
  624. pointer_default(unique)
  625. ]
  626. interface IActiveScriptEncode : IUnknown
  627. {
  628. // NOTES:
  629. // (*) pchIn must not be NULL, cchIn must be > 0
  630. // (*) pchIn does not need to be NULL terminated
  631. // (*) cchOut must contain size (OLECHAR count) of szOut buffer
  632. // (*) *pcchRet will contain size (OLECHAR count) of encoded section
  633. // (*) if pchOut is NULL or cchOut is less than required buffer size,
  634. // *pcchRet will be set to required size and ERROR_INSUFFICIENT_BUFFER
  635. // will be returned
  636. // (*) if buffer is less than required size, buffer contents (up to pchOut[*pcchRet-1])
  637. // may be modified
  638. // (*) pchOut will not be NULL terminated
  639. HRESULT EncodeSection(
  640. [in] LPCOLESTR pchIn,
  641. [in] DWORD cchIn,
  642. [in, out] LPOLESTR pchOut,
  643. [in] DWORD cchOut,
  644. [in, out] DWORD *pcchRet
  645. );
  646. // NOTES:
  647. // (*) pchIn must not be NULL, cchIn must be > 0
  648. // (*) pchIn does not need to be NULL terminated
  649. // (*) cchOut must contain size (OLECHAR count) of szOut buffer
  650. // (*) *pcchRet will contain size (OLECHAR count) of encoded section
  651. // (*) if pchOut is NULL or cchOut is less than required buffer size,
  652. // *pcchRet will be set to required size and ERROR_INSUFFICIENT_BUFFER
  653. // will be returned
  654. // (*) if buffer is less than required size, buffer contents (up to pchOut[*pcchRet-1])
  655. // may be modified
  656. // (*) pchOut will not be NULL terminated
  657. HRESULT DecodeScript(
  658. [in] LPCOLESTR pchIn,
  659. [in] DWORD cchIn,
  660. [in, out] LPOLESTR pchOut,
  661. [in] DWORD cchOut,
  662. [in, out] DWORD *pcchRet
  663. );
  664. // NOTES:
  665. // (*) Caller must free BSTR
  666. HRESULT GetEncodeProgId(
  667. [in, out] BSTR *pbstrOut
  668. );
  669. }
  670. [
  671. object,
  672. uuid(BEE9B76E-CFE3-11d1-B747-00C04FC2B085),
  673. pointer_default(unique)
  674. ]
  675. interface IActiveScriptHostEncode : IUnknown
  676. {
  677. // NOTES:
  678. // (*) szInFile must not be NULL
  679. // (*) szInFile must be NULL-terminated
  680. // (*) caller must free bstrOutFile
  681. HRESULT EncodeScriptHostFile(
  682. [in] BSTR bstrInFile,
  683. [in, out] BSTR *pbstrOutFile,
  684. [in] unsigned long cFlags,
  685. [in] BSTR bstrDefaultLang
  686. );
  687. }
  688. [
  689. object,
  690. uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
  691. pointer_default(unique)
  692. ]
  693. interface IBindEventHandler : IUnknown
  694. {
  695. HRESULT BindHandler(
  696. [in] LPCOLESTR pstrEvent,
  697. [in] IDispatch *pdisp
  698. );
  699. }
  700. [
  701. object,
  702. uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
  703. pointer_default(unique)
  704. ]
  705. interface IActiveScriptStats : IUnknown
  706. {
  707. HRESULT GetStat(
  708. [in] DWORD stid,
  709. [out] ULONG *pluHi,
  710. [out] ULONG *pluLo
  711. );
  712. HRESULT GetStatEx(
  713. [in] REFGUID guid,
  714. [out] ULONG *pluHi,
  715. [out] ULONG *pluLo
  716. );
  717. HRESULT ResetStats(void);
  718. }
  719. [
  720. object,
  721. uuid(4954E0D0-FBC7-11D1-8410-006008C3FBFC),
  722. pointer_default(unique)
  723. ]
  724. interface IActiveScriptProperty : IUnknown
  725. {
  726. // NOTES:
  727. // (*) This is a generic information passing interface to allow
  728. // the host to get and set pre-defined properties of the engine
  729. // (*) dwProperty must be a SCRIPTPROP_* value
  730. // (*) pvarIndex (when used) further identifies the dwProperty
  731. // (*) pvarValue is the value of the property, can be any VARIANT including
  732. // binary data in a VT_BSTR, most common is VT_BOOL
  733. HRESULT GetProperty(
  734. [in] DWORD dwProperty,
  735. [in] VARIANT *pvarIndex,
  736. [out] VARIANT *pvarValue
  737. );
  738. HRESULT SetProperty(
  739. [in] DWORD dwProperty,
  740. [in] VARIANT *pvarIndex,
  741. [in] VARIANT *pvarValue
  742. );
  743. }
  744. [
  745. object,
  746. uuid(1DC9CA50-06EF-11d2-8415-006008C3FBFC),
  747. pointer_default(unique)
  748. ]
  749. interface ITridentEventSink : IUnknown
  750. {
  751. HRESULT FireEvent(
  752. [in] LPCOLESTR pstrEvent,
  753. [in] DISPPARAMS *pdp,
  754. [out] VARIANT *pvarRes,
  755. [out] EXCEPINFO *pei
  756. );
  757. }
  758. [
  759. object,
  760. uuid(6AA2C4A0-2B53-11d4-A2A0-00104BD35090),
  761. pointer_default(unique)
  762. ]
  763. interface IActiveScriptGarbageCollector : IUnknown
  764. {
  765. HRESULT CollectGarbage(
  766. SCRIPTGCTYPE scriptgctype
  767. );
  768. }
  769. [
  770. object,
  771. uuid(764651D0-38DE-11d4-A2A3-00104BD35090),
  772. pointer_default(unique)
  773. ]
  774. interface IActiveScriptSIPInfo : IUnknown
  775. {
  776. HRESULT GetSIPOID(
  777. [out] GUID * poid_sip
  778. );
  779. }
  780. cpp_quote("")
  781. cpp_quote("#endif // __ActivScp_h")
  782. cpp_quote("")