xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / activscp.idl
blobe539b04ccd6c5f854604efea54c37c198d9f43f3
1 /*
2 * Copyright 2004 Kevin Koltzau
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.
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.
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
19 #ifndef DO_NO_IMPORTS
20 import "ocidl.idl";
21 import "oleidl.idl";
22 import "oaidl.idl";
23 #endif
25 cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
27 cpp_quote("DEFINE_GUID(CATID_ActiveScript, 0xf0b7a1a1,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
28 cpp_quote("DEFINE_GUID(CATID_ActiveScriptParse, 0xf0b7a1a2,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
29 cpp_quote("DEFINE_GUID(CATID_ActiveScriptEncode, 0xf0b7a1a3,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
31 cpp_quote("#endif")
33 cpp_quote("#define SCRIPTPROP_NAME 0x00000000")
34 cpp_quote("#define SCRIPTPROP_MAJORVERSION 0x00000001")
35 cpp_quote("#define SCRIPTPROP_MINORVERSION 0x00000002")
36 cpp_quote("#define SCRIPTPROP_BUILDNUMBER 0x00000003")
37 cpp_quote("#define SCRIPTPROP_DELAYEDEVENTSINKING 0x00001000")
38 cpp_quote("#define SCRIPTPROP_CATCHEXCEPTION 0x00001001")
39 cpp_quote("#define SCRIPTPROP_CONVERSIONLCID 0x00001002")
40 cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED 0x00001003")
41 cpp_quote("#define SCRIPTPROP_DEBUGGER 0x00001100")
42 cpp_quote("#define SCRIPTPROP_JITDEBUG 0x00001101")
43 cpp_quote("#define SCRIPTPROP_INVOKEVERSIONING 0x00004000")
45 cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT 0x70000000")
46 cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK 0x70000001")
47 cpp_quote("#define SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION 0x70000002")
49 typedef enum tagSCRIPTSTATE {
50 SCRIPTSTATE_UNINITIALIZED = 0,
51 SCRIPTSTATE_STARTED = 1,
52 SCRIPTSTATE_CONNECTED = 2,
53 SCRIPTSTATE_DISCONNECTED = 3,
54 SCRIPTSTATE_CLOSED = 4,
55 SCRIPTSTATE_INITIALIZED = 5
56 } SCRIPTSTATE;
58 typedef enum tagSCRIPTTHREADSTATE {
59 SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
60 SCRIPTTHREADSTATE_RUNNING = 1
61 } SCRIPTTHREADSTATE;
63 typedef enum tagSCRIPTUICITEM {
64 SCRIPTUICITEM_INPUTBOX = 1,
65 SCRIPTUICITEM_MSGBOX = 2
66 } SCRIPTUICITEM;
68 typedef enum tagSCRIPTUICHANDLING {
69 SCRIPTUICHANDLING_ALLOW = 0,
70 SCRIPTUICHANDLING_NOUIERROR = 1,
71 SCRIPTUICHANDLING_NOUIDEFAULT = 2
72 } SCRIPTUICHANDLING;
74 typedef enum tagSCRIPTGCTYPE {
75 SCRIPTGCTYPE_NORMAL = 0,
76 SCRIPTGCTYPE_EXHAUSTIVE = 1
77 } SCRIPTGCTYPE;
79 typedef DWORD SCRIPTTHREADID;
80 cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
81 cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
82 cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
84 cpp_quote("#define SCRIPTITEM_ISVISIBLE 0x00000002")
85 cpp_quote("#define SCRIPTITEM_ISSOURCE 0x00000004")
86 cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS 0x00000008")
87 cpp_quote("#define SCRIPTITEM_ISPERSISTENT 0x00000040")
88 cpp_quote("#define SCRIPTITEM_CODEONLY 0x00000200")
89 cpp_quote("#define SCRIPTITEM_NOCODE 0x00000400")
90 cpp_quote("#define SCRIPTITEM_ALL_FLAGS (SCRIPTITEM_ISSOURCE | \\")
91 cpp_quote(" SCRIPTITEM_ISVISIBLE | \\")
92 cpp_quote(" SCRIPTITEM_ISPERSISTENT | \\")
93 cpp_quote(" SCRIPTITEM_GLOBALMEMBERS | \\")
94 cpp_quote(" SCRIPTITEM_NOCODE | \\")
95 cpp_quote(" SCRIPTITEM_CODEONLY)")
96 cpp_quote("#define SCRIPTTYPELIB_ISCONTROL 0x00000010")
97 cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT 0x00000040")
98 cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
99 cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION 0x00000001")
100 cpp_quote("#define SCRIPTTEXT_ISVISIBLE 0x00000002")
101 cpp_quote("#define SCRIPTTEXT_ISEXPRESSION 0x00000020")
102 cpp_quote("#define SCRIPTTEXT_ISPERSISTENT 0x00000040")
103 cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE 0x00000080")
104 cpp_quote("#define SCRIPTTEXT_ALL_FLAGS (SCRIPTTEXT_DELAYEXECUTION | \\")
105 cpp_quote(" SCRIPTTEXT_ISVISIBLE | \\")
106 cpp_quote(" SCRIPTTEXT_ISEXPRESSION | \\")
107 cpp_quote(" SCRIPTTEXT_ISPERSISTENT | \\")
108 cpp_quote(" SCRIPTTEXT_HOSTMANAGESSOURCE)")
109 cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE 0x00000080")
110 cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS 0x00000100")
111 cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS 0x00000200")
112 cpp_quote("#define SCRIPTPROC_ALL_FLAGS (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
113 cpp_quote(" SCRIPTPROC_IMPLICIT_THIS | \\")
114 cpp_quote(" SCRIPTPROC_IMPLICIT_PARENTS)")
115 cpp_quote("#define SCRIPTINFO_IUNKNOWN 0x00000001")
116 cpp_quote("#define SCRIPTINFO_ITYPEINFO 0x00000002")
117 cpp_quote("#define SCRIPTINFO_ALL_FLAGS (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
118 cpp_quote("#define SCRIPTINTERRUPT_DEBUG 0x00000001")
119 cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
120 cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
121 cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT 1")
122 cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT 2")
123 cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME 3")
124 cpp_quote("#define SCRIPTSTAT_TOTAL_TIME 4")
126 cpp_quote("#define SCRIPT_E_RECORDED 0x86664004")
127 cpp_quote("#define SCRIPT_E_REPORTED 0x80020101")
128 cpp_quote("#define SCRIPT_E_PROPAGATE 0x80020102")
131 object,
132 uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
133 pointer_default(unique)
135 interface IActiveScriptError : IUnknown
137 HRESULT GetExceptionInfo(
138 [out] EXCEPINFO *pexcepinfo
141 HRESULT GetSourcePosition(
142 [out] DWORD *pdwSourceContext,
143 [out] ULONG *pulLineNumber,
144 [out] LONG *plCharacterPosition
147 HRESULT GetSourceLineText(
148 [out] BSTR *pbstrSourceLine
153 object,
154 uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
155 pointer_default(unique)
157 interface IActiveScriptSite : IUnknown
159 HRESULT GetLCID(
160 [out] LCID *plcid);
162 HRESULT GetItemInfo(
163 [in] LPCOLESTR pstrName,
164 [in] DWORD dwReturnMask,
165 [out] IUnknown **ppiunkItem,
166 [out] ITypeInfo **ppti
169 HRESULT GetDocVersionString(
170 [out] BSTR *pbstrVersion
173 HRESULT OnScriptTerminate(
174 [in] const VARIANT *pvarResult,
175 [in] const EXCEPINFO *pexcepinfo
178 HRESULT OnStateChange(
179 [in] SCRIPTSTATE ssScriptState
182 HRESULT OnScriptError(
183 [in] IActiveScriptError *pscripterror
186 HRESULT OnEnterScript(void);
188 HRESULT OnLeaveScript(void);
191 cpp_quote("typedef IActiveScriptSite *PIActiveScriptSite;")
194 object,
195 uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
196 pointer_default(unique)
198 interface IActiveScriptSiteWindow : IUnknown
200 HRESULT GetWindow(
201 [out] HWND *phwnd
204 HRESULT EnableModeless(
205 [in] BOOL fEnable
210 object,
211 uuid(aedae97e-d7ee-4796-b960-7f092ae844ab),
212 pointer_default(unique)
214 interface IActiveScriptSiteUIControl : IUnknown
216 HRESULT GetUIBehavior(
217 [in] SCRIPTUICITEM UicItem,
218 [out] SCRIPTUICHANDLING *pUicHandling);
222 object,
223 uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
224 pointer_default(unique)
226 interface IActiveScriptSiteInterruptPoll : IUnknown
228 HRESULT QueryContinue();
232 object,
233 uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
234 pointer_default(unique)
236 interface IActiveScript : IUnknown
238 HRESULT SetScriptSite(
239 [in] IActiveScriptSite *pass
242 HRESULT GetScriptSite(
243 [in] REFIID riid,
244 [out, iid_is(riid)] void **ppvObject
247 HRESULT SetScriptState(
248 [in] SCRIPTSTATE ss
251 HRESULT GetScriptState(
252 [out] SCRIPTSTATE *pssState
255 HRESULT Close(void);
257 HRESULT AddNamedItem(
258 [in] LPCOLESTR pstrName,
259 [in] DWORD dwFlags
262 HRESULT AddTypeLib(
263 [in] REFGUID rguidTypeLib,
264 [in] DWORD dwMajor,
265 [in] DWORD dwMinor,
266 [in] DWORD dwFlags
269 HRESULT GetScriptDispatch(
270 [in] LPCOLESTR pstrItemName,
271 [out] IDispatch **ppdisp
274 HRESULT GetCurrentScriptThreadID(
275 [out] SCRIPTTHREADID *pstidThread
278 HRESULT GetScriptThreadID(
279 [in] DWORD dwWin32ThreadId,
280 [out] SCRIPTTHREADID *pstidThread
283 HRESULT GetScriptThreadState(
284 [in] SCRIPTTHREADID stidThread,
285 [out] SCRIPTTHREADSTATE *pstsState
288 HRESULT InterruptScriptThread(
289 [in] SCRIPTTHREADID stidThread,
290 [in] const EXCEPINFO *pexcepinfo,
291 [in] DWORD dwFlags
294 HRESULT Clone(
295 [out] IActiveScript **ppscript
299 cpp_quote("typedef IActiveScript *PIActiveScript;")
302 object,
303 uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
304 pointer_default(unique)
306 interface IActiveScriptParse32 : IUnknown
308 HRESULT InitNew(void);
310 HRESULT AddScriptlet(
311 [in] LPCOLESTR pstrDefaultName,
312 [in] LPCOLESTR pstrCode,
313 [in] LPCOLESTR pstrItemName,
314 [in] LPCOLESTR pstrSubItemName,
315 [in] LPCOLESTR pstrEventName,
316 [in] LPCOLESTR pstrDelimiter,
317 [in] DWORD dwSourceContextCookie,
318 [in] ULONG ulStartingLineNumber,
319 [in] DWORD dwFlags,
320 [out] BSTR *pbstrName,
321 [out] EXCEPINFO *pexcepinfo
324 HRESULT ParseScriptText(
325 [in] LPCOLESTR pstrCode,
326 [in] LPCOLESTR pstrItemName,
327 [in] IUnknown *punkContext,
328 [in] LPCOLESTR pstrDelimiter,
329 [in] DWORD dwSourceContextCookie,
330 [in] ULONG ulStartingLineNumber,
331 [in] DWORD dwFlags,
332 [out] VARIANT *pvarResult,
333 [out] EXCEPINFO *pexcepinfo
338 object,
339 uuid(c7ef7658-e1ee-480e-97ea-d52cb4d76d17),
340 pointer_default(unique)
342 interface IActiveScriptParse64 : IUnknown
344 HRESULT InitNew(void);
346 HRESULT AddScriptlet(
347 [in] LPCOLESTR pstrDefaultName,
348 [in] LPCOLESTR pstrCode,
349 [in] LPCOLESTR pstrItemName,
350 [in] LPCOLESTR pstrSubItemName,
351 [in] LPCOLESTR pstrEventName,
352 [in] LPCOLESTR pstrDelimiter,
353 [in] DWORDLONG dwSourceContextCookie,
354 [in] ULONG ulStartingLineNumber,
355 [in] DWORD dwFlags,
356 [out] BSTR *pbstrName,
357 [out] EXCEPINFO *pexcepinfo
360 HRESULT ParseScriptText(
361 [in] LPCOLESTR pstrCode,
362 [in] LPCOLESTR pstrItemName,
363 [in] IUnknown *punkContext,
364 [in] LPCOLESTR pstrDelimiter,
365 [in] DWORDLONG dwSourceContextCookie,
366 [in] ULONG ulStartingLineNumber,
367 [in] DWORD dwFlags,
368 [out] VARIANT *pvarResult,
369 [out] EXCEPINFO *pexcepinfo
373 cpp_quote("#ifdef _WIN64")
374 cpp_quote("#define IActiveScriptParse IActiveScriptParse64")
375 cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse64")
376 cpp_quote("#else")
377 cpp_quote("#define IActiveScriptParse IActiveScriptParse32")
378 cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse32")
379 cpp_quote("#endif")
381 cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
384 object,
385 uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
386 pointer_default(unique)
388 interface IActiveScriptParseProcedureOld32 : IUnknown
390 HRESULT ParseProcedureText(
391 [in] LPCOLESTR pstrCode,
392 [in] LPCOLESTR pstrFormalParams,
393 [in] LPCOLESTR pstrItemName,
394 [in] IUnknown *punkContext,
395 [in] LPCOLESTR pstrDelimiter,
396 [in] DWORD dwSourceContextCookie,
397 [in] ULONG ulStartingLineNumber,
398 [in] DWORD dwFlags,
399 [out] IDispatch **ppdisp
404 object,
405 uuid(21f57128-08c9-4638-ba12-22d15d88dc5c),
406 pointer_default(unique)
408 interface IActiveScriptParseProcedureOld64 : IUnknown
410 HRESULT ParseProcedureText(
411 [in] LPCOLESTR pstrCode,
412 [in] LPCOLESTR pstrFormalParams,
413 [in] LPCOLESTR pstrItemName,
414 [in] IUnknown *punkContext,
415 [in] LPCOLESTR pstrDelimiter,
416 [in] DWORDLONG dwSourceContextCookie,
417 [in] ULONG ulStartingLineNumber,
418 [in] DWORD dwFlags,
419 [out] IDispatch **ppdisp
423 cpp_quote("#ifdef _WIN64")
424 cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld64")
425 cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld64")
426 cpp_quote("#else")
427 cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld32")
428 cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld32")
429 cpp_quote("#endif")
432 object,
433 uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
434 pointer_default(unique)
436 interface IActiveScriptParseProcedure32 : IUnknown
438 HRESULT ParseProcedureText(
439 [in] LPCOLESTR pstrCode,
440 [in] LPCOLESTR pstrFormalParams,
441 [in] LPCOLESTR pstrProcedureName,
442 [in] LPCOLESTR pstrItemName,
443 [in] IUnknown *punkContext,
444 [in] LPCOLESTR pstrDelimiter,
445 [in] DWORD dwSourceContextCookie,
446 [in] ULONG ulStartingLineNumber,
447 [in] DWORD dwFlags,
448 [out] IDispatch **ppdisp
453 object,
454 uuid(c64713b6-e029-4cc5-9200-438b72890b6a),
455 pointer_default(unique)
457 interface IActiveScriptParseProcedure64 : IUnknown
459 HRESULT ParseProcedureText(
460 [in] LPCOLESTR pstrCode,
461 [in] LPCOLESTR pstrFormalParams,
462 [in] LPCOLESTR pstrProcedureName,
463 [in] LPCOLESTR pstrItemName,
464 [in] IUnknown *punkContext,
465 [in] LPCOLESTR pstrDelimiter,
466 [in] DWORDLONG dwSourceContextCookie,
467 [in] ULONG ulStartingLineNumber,
468 [in] DWORD dwFlags,
469 [out] IDispatch **ppdisp
473 cpp_quote("#ifdef _WIN64")
474 cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure64")
475 cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure64")
476 cpp_quote("#else")
477 cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure32")
478 cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure32")
479 cpp_quote("#endif")
482 object,
483 uuid(71ee5b20-fb04-11d1-b3a8-00a0c911e8b2),
484 pointer_default(unique)
486 interface IActiveScriptParseProcedure2_32 : IActiveScriptParseProcedure32
491 object,
492 uuid(fe7c4271-210c-448d-9f54-76dab7047b28),
493 pointer_default(unique)
495 interface IActiveScriptParseProcedure2_64 : IActiveScriptParseProcedure64
499 cpp_quote("#ifdef _WIN64")
500 cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_64")
501 cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_64")
502 cpp_quote("#else")
503 cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_32")
504 cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_32")
505 cpp_quote("#endif")
508 object,
509 uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
510 pointer_default(unique)
512 interface IBindEventHandler : IUnknown
514 HRESULT BindHandler(
515 [in] LPCOLESTR pstrEvent,
516 [in] IDispatch *pdisp
521 object,
522 uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
523 pointer_default(unique)
525 interface IActiveScriptStats : IUnknown
527 HRESULT GetStat(
528 [in] DWORD stid,
529 [out] ULONG *pluHi,
530 [out] ULONG *pluLo
533 HRESULT GetStatEx(
534 [in] REFGUID guid,
535 [out] ULONG *pluHi,
536 [out] ULONG *pluLo
539 HRESULT ResetStats(void);
543 object,
544 uuid(4954e0d0-fbc7-11d1-8410-006008c3fbfc),
545 pointer_default(unique)
547 interface IActiveScriptProperty : IUnknown
549 HRESULT GetProperty(
550 [in] DWORD dwProperty,
551 [in] VARIANT *pvarIndex,
552 [out] VARIANT *pvarValue);
554 HRESULT SetProperty(
555 [in] DWORD dwProperty,
556 [in] VARIANT *pvarIndex,
557 [in] VARIANT *pvarValue);
561 object,
562 uuid(6aa2c4a0-2b53-11d4-a2a0-00104bd35090),
563 pointer_default(unique)
565 interface IActiveScriptGarbageCollector : IUnknown
567 HRESULT CollectGarbage(
568 [in] SCRIPTGCTYPE gctype);