xref: /reactos/sdk/include/psdk/activscp.idl (revision 98e8827a)
1/*
2 * Copyright 2004 Kevin Koltzau
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
19#ifndef DO_NO_IMPORTS
20import "ocidl.idl";
21import "oleidl.idl";
22import "oaidl.idl";
23#endif
24
25cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
26
27cpp_quote("DEFINE_GUID(CATID_ActiveScript,       0xf0b7a1a1,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
28cpp_quote("DEFINE_GUID(CATID_ActiveScriptParse,  0xf0b7a1a2,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
29cpp_quote("DEFINE_GUID(CATID_ActiveScriptEncode, 0xf0b7a1a3,0x9847,0x11cf,0x8f,0x20,0x00,0x80,0x5f,0x2c,0xd0,0x64);")
30
31cpp_quote("#endif")
32
33cpp_quote("#define SCRIPTPROP_NAME                   0x00000000")
34cpp_quote("#define SCRIPTPROP_MAJORVERSION           0x00000001")
35cpp_quote("#define SCRIPTPROP_MINORVERSION           0x00000002")
36cpp_quote("#define SCRIPTPROP_BUILDNUMBER            0x00000003")
37cpp_quote("#define SCRIPTPROP_DELAYEDEVENTSINKING    0x00001000")
38cpp_quote("#define SCRIPTPROP_CATCHEXCEPTION         0x00001001")
39cpp_quote("#define SCRIPTPROP_CONVERSIONLCID         0x00001002")
40cpp_quote("#define SCRIPTPROP_HOSTSTACKREQUIRED      0x00001003")
41cpp_quote("#define SCRIPTPROP_DEBUGGER               0x00001100")
42cpp_quote("#define SCRIPTPROP_JITDEBUG               0x00001101")
43cpp_quote("#define SCRIPTPROP_INVOKEVERSIONING       0x00004000")
44
45cpp_quote("#define SCRIPTPROP_HACK_FIBERSUPPORT                0x70000000")
46cpp_quote("#define SCRIPTPROP_HACK_TRIDENTEVENTSINK            0x70000001")
47cpp_quote("#define SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION 0x70000002")
48
49typedef enum tagSCRIPTLANGUAGEVERSION {
50    SCRIPTLANGUAGEVERSION_DEFAULT = 0,
51    SCRIPTLANGUAGEVERSION_5_7     = 1,
52    SCRIPTLANGUAGEVERSION_5_8     = 2,
53    SCRIPTLANGUAGEVERSION_MAX     = 255
54} SCRIPTLANGUAGEVERSION;
55
56typedef enum tagSCRIPTSTATE {
57    SCRIPTSTATE_UNINITIALIZED = 0,
58    SCRIPTSTATE_STARTED       = 1,
59    SCRIPTSTATE_CONNECTED     = 2,
60    SCRIPTSTATE_DISCONNECTED  = 3,
61    SCRIPTSTATE_CLOSED        = 4,
62    SCRIPTSTATE_INITIALIZED   = 5
63} SCRIPTSTATE;
64
65typedef enum tagSCRIPTTHREADSTATE {
66    SCRIPTTHREADSTATE_NOTINSCRIPT = 0,
67    SCRIPTTHREADSTATE_RUNNING     = 1
68} SCRIPTTHREADSTATE;
69
70typedef enum tagSCRIPTUICITEM {
71    SCRIPTUICITEM_INPUTBOX = 1,
72    SCRIPTUICITEM_MSGBOX   = 2
73} SCRIPTUICITEM;
74
75typedef enum tagSCRIPTUICHANDLING {
76    SCRIPTUICHANDLING_ALLOW       = 0,
77    SCRIPTUICHANDLING_NOUIERROR   = 1,
78    SCRIPTUICHANDLING_NOUIDEFAULT = 2
79} SCRIPTUICHANDLING;
80
81typedef enum tagSCRIPTGCTYPE {
82    SCRIPTGCTYPE_NORMAL     = 0,
83    SCRIPTGCTYPE_EXHAUSTIVE = 1
84} SCRIPTGCTYPE;
85
86typedef DWORD SCRIPTTHREADID;
87cpp_quote("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
88cpp_quote("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
89cpp_quote("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
90
91cpp_quote("#define SCRIPTITEM_ISVISIBLE           0x00000002")
92cpp_quote("#define SCRIPTITEM_ISSOURCE            0x00000004")
93cpp_quote("#define SCRIPTITEM_GLOBALMEMBERS       0x00000008")
94cpp_quote("#define SCRIPTITEM_ISPERSISTENT        0x00000040")
95cpp_quote("#define SCRIPTITEM_CODEONLY            0x00000200")
96cpp_quote("#define SCRIPTITEM_NOCODE              0x00000400")
97cpp_quote("#define SCRIPTITEM_ALL_FLAGS           (SCRIPTITEM_ISSOURCE | \\")
98cpp_quote("                                        SCRIPTITEM_ISVISIBLE | \\")
99cpp_quote("                                        SCRIPTITEM_ISPERSISTENT | \\")
100cpp_quote("                                        SCRIPTITEM_GLOBALMEMBERS | \\")
101cpp_quote("                                        SCRIPTITEM_NOCODE | \\")
102cpp_quote("                                        SCRIPTITEM_CODEONLY)")
103cpp_quote("#define SCRIPTTYPELIB_ISCONTROL        0x00000010")
104cpp_quote("#define SCRIPTTYPELIB_ISPERSISTENT     0x00000040")
105cpp_quote("#define SCRIPTTYPELIB_ALL_FLAGS        (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
106cpp_quote("#define SCRIPTTEXT_DELAYEXECUTION      0x00000001")
107cpp_quote("#define SCRIPTTEXT_ISVISIBLE           0x00000002")
108cpp_quote("#define SCRIPTTEXT_ISEXPRESSION        0x00000020")
109cpp_quote("#define SCRIPTTEXT_ISPERSISTENT        0x00000040")
110cpp_quote("#define SCRIPTTEXT_HOSTMANAGESSOURCE   0x00000080")
111cpp_quote("#define SCRIPTTEXT_ALL_FLAGS           (SCRIPTTEXT_DELAYEXECUTION | \\")
112cpp_quote("                                        SCRIPTTEXT_ISVISIBLE | \\")
113cpp_quote("                                        SCRIPTTEXT_ISEXPRESSION | \\")
114cpp_quote("                                        SCRIPTTEXT_ISPERSISTENT | \\")
115cpp_quote("                                        SCRIPTTEXT_HOSTMANAGESSOURCE)")
116cpp_quote("#define SCRIPTPROC_ISEXPRESSION        0x00000020")
117cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE   0x00000080")
118cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS       0x00000100")
119cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS    0x00000200")
120cpp_quote("#define SCRIPTPROC_ALL_FLAGS           (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
121cpp_quote("                                        SCRIPTPROC_IMPLICIT_THIS | \\")
122cpp_quote("                                        SCRIPTPROC_IMPLICIT_PARENTS)")
123cpp_quote("#define SCRIPTINFO_IUNKNOWN            0x00000001")
124cpp_quote("#define SCRIPTINFO_ITYPEINFO           0x00000002")
125cpp_quote("#define SCRIPTINFO_ALL_FLAGS           (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
126cpp_quote("#define SCRIPTINTERRUPT_DEBUG          0x00000001")
127cpp_quote("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
128cpp_quote("#define SCRIPTINTERRUPT_ALL_FLAGS      (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
129cpp_quote("#define SCRIPTSTAT_STATEMENT_COUNT      1")
130cpp_quote("#define SCRIPTSTAT_INSTRUCTION_COUNT    2")
131cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME    3")
132cpp_quote("#define SCRIPTSTAT_TOTAL_TIME           4")
133
134cpp_quote("#define SCRIPT_E_RECORDED  0x86664004")
135cpp_quote("#define SCRIPT_E_REPORTED  0x80020101")
136cpp_quote("#define SCRIPT_E_PROPAGATE 0x80020102")
137
138[
139object,
140uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
141pointer_default(unique)
142]
143interface IActiveScriptError : IUnknown
144{
145    HRESULT GetExceptionInfo(
146            [out] EXCEPINFO *pexcepinfo
147    );
148
149    HRESULT GetSourcePosition(
150            [out] DWORD *pdwSourceContext,
151            [out] ULONG *pulLineNumber,
152            [out] LONG *plCharacterPosition
153    );
154
155    HRESULT GetSourceLineText(
156            [out] BSTR *pbstrSourceLine
157    );
158}
159
160[
161object,
162uuid(DB01A1E3-A42B-11cf-8F20-00805F2CD064),
163pointer_default(unique)
164]
165interface IActiveScriptSite : IUnknown
166{
167    HRESULT GetLCID(
168            [out] LCID *plcid);
169
170    HRESULT GetItemInfo(
171            [in] LPCOLESTR pstrName,
172            [in] DWORD dwReturnMask,
173            [out] IUnknown **ppiunkItem,
174            [out] ITypeInfo **ppti
175    );
176
177    HRESULT GetDocVersionString(
178            [out] BSTR *pbstrVersion
179    );
180
181    HRESULT OnScriptTerminate(
182            [in] const VARIANT *pvarResult,
183            [in] const EXCEPINFO *pexcepinfo
184    );
185
186    HRESULT OnStateChange(
187            [in] SCRIPTSTATE ssScriptState
188    );
189
190    HRESULT OnScriptError(
191            [in] IActiveScriptError *pscripterror
192    );
193
194    HRESULT OnEnterScript(void);
195
196    HRESULT OnLeaveScript(void);
197}
198
199cpp_quote("typedef IActiveScriptSite *PIActiveScriptSite;")
200
201[
202object,
203uuid(D10F6761-83E9-11cf-8F20-00805F2CD064),
204pointer_default(unique)
205]
206interface IActiveScriptSiteWindow : IUnknown
207{
208    HRESULT GetWindow(
209            [out] HWND *phwnd
210    );
211
212    HRESULT EnableModeless(
213            [in] BOOL fEnable
214    );
215}
216
217[
218    object,
219    uuid(aedae97e-d7ee-4796-b960-7f092ae844ab),
220    pointer_default(unique)
221]
222interface IActiveScriptSiteUIControl : IUnknown
223{
224    HRESULT GetUIBehavior(
225            [in]  SCRIPTUICITEM UicItem,
226            [out] SCRIPTUICHANDLING *pUicHandling);
227}
228
229[
230object,
231uuid(539698A0-CDCA-11CF-A5EB-00AA0047A063),
232pointer_default(unique)
233]
234interface IActiveScriptSiteInterruptPoll : IUnknown
235{
236    HRESULT QueryContinue();
237}
238
239[
240object,
241uuid(BB1A2AE1-A4F9-11cf-8F20-00805F2CD064),
242pointer_default(unique)
243]
244interface IActiveScript : IUnknown
245{
246    HRESULT SetScriptSite(
247            [in] IActiveScriptSite *pass
248    );
249
250    HRESULT GetScriptSite(
251            [in] REFIID riid,
252            [out, iid_is(riid)] void **ppvObject
253    );
254
255    HRESULT SetScriptState(
256            [in] SCRIPTSTATE ss
257    );
258
259    HRESULT GetScriptState(
260            [out] SCRIPTSTATE *pssState
261    );
262
263    HRESULT Close(void);
264
265    HRESULT AddNamedItem(
266            [in] LPCOLESTR pstrName,
267            [in] DWORD dwFlags
268    );
269
270    HRESULT AddTypeLib(
271            [in] REFGUID rguidTypeLib,
272            [in] DWORD dwMajor,
273            [in] DWORD dwMinor,
274            [in] DWORD dwFlags
275    );
276
277    HRESULT GetScriptDispatch(
278            [in] LPCOLESTR pstrItemName,
279            [out] IDispatch **ppdisp
280    );
281
282    HRESULT GetCurrentScriptThreadID(
283            [out] SCRIPTTHREADID *pstidThread
284    );
285
286    HRESULT GetScriptThreadID(
287            [in] DWORD dwWin32ThreadId,
288            [out] SCRIPTTHREADID *pstidThread
289    );
290
291    HRESULT GetScriptThreadState(
292            [in] SCRIPTTHREADID stidThread,
293            [out] SCRIPTTHREADSTATE *pstsState
294    );
295
296    HRESULT InterruptScriptThread(
297            [in] SCRIPTTHREADID stidThread,
298            [in] const EXCEPINFO *pexcepinfo,
299            [in] DWORD dwFlags
300    );
301
302    HRESULT Clone(
303            [out] IActiveScript **ppscript
304    );
305}
306
307cpp_quote("typedef IActiveScript *PIActiveScript;")
308
309[
310object,
311uuid(BB1A2AE2-A4F9-11cf-8F20-00805F2CD064),
312pointer_default(unique)
313]
314interface IActiveScriptParse32 : IUnknown
315{
316    HRESULT InitNew(void);
317
318    HRESULT AddScriptlet(
319            [in] LPCOLESTR pstrDefaultName,
320            [in] LPCOLESTR pstrCode,
321            [in] LPCOLESTR pstrItemName,
322            [in] LPCOLESTR pstrSubItemName,
323            [in] LPCOLESTR pstrEventName,
324            [in] LPCOLESTR pstrDelimiter,
325            [in] DWORD dwSourceContextCookie,
326            [in] ULONG ulStartingLineNumber,
327            [in] DWORD dwFlags,
328            [out] BSTR *pbstrName,
329            [out] EXCEPINFO *pexcepinfo
330    );
331
332    HRESULT ParseScriptText(
333            [in] LPCOLESTR pstrCode,
334            [in] LPCOLESTR pstrItemName,
335            [in] IUnknown *punkContext,
336            [in] LPCOLESTR pstrDelimiter,
337            [in] DWORD dwSourceContextCookie,
338            [in] ULONG ulStartingLineNumber,
339            [in] DWORD dwFlags,
340            [out] VARIANT *pvarResult,
341            [out] EXCEPINFO *pexcepinfo
342    );
343}
344
345[
346   object,
347   uuid(c7ef7658-e1ee-480e-97ea-d52cb4d76d17),
348   pointer_default(unique)
349]
350interface IActiveScriptParse64 : IUnknown
351{
352    HRESULT InitNew(void);
353
354    HRESULT AddScriptlet(
355            [in] LPCOLESTR pstrDefaultName,
356            [in] LPCOLESTR pstrCode,
357            [in] LPCOLESTR pstrItemName,
358            [in] LPCOLESTR pstrSubItemName,
359            [in] LPCOLESTR pstrEventName,
360            [in] LPCOLESTR pstrDelimiter,
361            [in] DWORDLONG dwSourceContextCookie,
362            [in] ULONG ulStartingLineNumber,
363            [in] DWORD dwFlags,
364            [out] BSTR *pbstrName,
365            [out] EXCEPINFO *pexcepinfo
366    );
367
368    HRESULT ParseScriptText(
369            [in] LPCOLESTR pstrCode,
370            [in] LPCOLESTR pstrItemName,
371            [in] IUnknown *punkContext,
372            [in] LPCOLESTR pstrDelimiter,
373            [in] DWORDLONG dwSourceContextCookie,
374            [in] ULONG ulStartingLineNumber,
375            [in] DWORD dwFlags,
376            [out] VARIANT *pvarResult,
377            [out] EXCEPINFO *pexcepinfo
378    );
379}
380
381cpp_quote("#ifdef _WIN64")
382cpp_quote("#define IActiveScriptParse IActiveScriptParse64")
383cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse64")
384cpp_quote("#else")
385cpp_quote("#define IActiveScriptParse IActiveScriptParse32")
386cpp_quote("#define IID_IActiveScriptParse IID_IActiveScriptParse32")
387cpp_quote("#endif")
388
389cpp_quote("typedef IActiveScriptParse *PIActiveScriptParse;")
390
391[
392object,
393uuid(1CFF0050-6FDD-11d0-9328-00A0C90DCAA9),
394pointer_default(unique)
395]
396interface IActiveScriptParseProcedureOld32 : IUnknown
397{
398    HRESULT ParseProcedureText(
399            [in] LPCOLESTR pstrCode,
400            [in] LPCOLESTR pstrFormalParams,
401            [in] LPCOLESTR pstrItemName,
402            [in] IUnknown *punkContext,
403            [in] LPCOLESTR pstrDelimiter,
404            [in] DWORD dwSourceContextCookie,
405            [in] ULONG ulStartingLineNumber,
406            [in] DWORD dwFlags,
407            [out] IDispatch **ppdisp
408    );
409}
410
411[
412    object,
413    uuid(21f57128-08c9-4638-ba12-22d15d88dc5c),
414    pointer_default(unique)
415]
416interface IActiveScriptParseProcedureOld64 : IUnknown
417{
418    HRESULT ParseProcedureText(
419            [in] LPCOLESTR pstrCode,
420            [in] LPCOLESTR pstrFormalParams,
421            [in] LPCOLESTR pstrItemName,
422            [in] IUnknown *punkContext,
423            [in] LPCOLESTR pstrDelimiter,
424            [in] DWORDLONG dwSourceContextCookie,
425            [in] ULONG ulStartingLineNumber,
426            [in] DWORD dwFlags,
427            [out] IDispatch **ppdisp
428    );
429}
430
431cpp_quote("#ifdef _WIN64")
432cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld64")
433cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld64")
434cpp_quote("#else")
435cpp_quote("#define IActiveScriptParseProcedureOld IActiveScriptParseProcedureOld32")
436cpp_quote("#define IID_IActiveScriptParseProcedureOld IID_IActiveScriptParseProcedureOld32")
437cpp_quote("#endif")
438
439[
440object,
441uuid(AA5B6A80-B834-11d0-932F-00A0C90DCAA9),
442pointer_default(unique)
443]
444interface IActiveScriptParseProcedure32 : IUnknown
445{
446    HRESULT ParseProcedureText(
447            [in] LPCOLESTR pstrCode,
448            [in] LPCOLESTR pstrFormalParams,
449            [in] LPCOLESTR pstrProcedureName,
450            [in] LPCOLESTR pstrItemName,
451            [in] IUnknown *punkContext,
452            [in] LPCOLESTR pstrDelimiter,
453            [in] DWORD dwSourceContextCookie,
454            [in] ULONG ulStartingLineNumber,
455            [in] DWORD dwFlags,
456            [out] IDispatch **ppdisp
457    );
458}
459
460[
461    object,
462    uuid(c64713b6-e029-4cc5-9200-438b72890b6a),
463    pointer_default(unique)
464]
465interface IActiveScriptParseProcedure64 : IUnknown
466{
467    HRESULT ParseProcedureText(
468            [in] LPCOLESTR pstrCode,
469            [in] LPCOLESTR pstrFormalParams,
470            [in] LPCOLESTR pstrProcedureName,
471            [in] LPCOLESTR pstrItemName,
472            [in] IUnknown *punkContext,
473            [in] LPCOLESTR pstrDelimiter,
474            [in] DWORDLONG dwSourceContextCookie,
475            [in] ULONG ulStartingLineNumber,
476            [in] DWORD dwFlags,
477            [out] IDispatch **ppdisp
478    );
479}
480
481cpp_quote("#ifdef _WIN64")
482cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure64")
483cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure64")
484cpp_quote("#else")
485cpp_quote("#define IActiveScriptParseProcedure IActiveScriptParseProcedure32")
486cpp_quote("#define IID_IActiveScriptParseProcedure IID_IActiveScriptParseProcedure32")
487cpp_quote("#endif")
488
489[
490    object,
491    uuid(71ee5b20-fb04-11d1-b3a8-00a0c911e8b2),
492    pointer_default(unique)
493]
494interface IActiveScriptParseProcedure2_32 : IActiveScriptParseProcedure32
495{
496}
497
498[
499    object,
500    uuid(fe7c4271-210c-448d-9f54-76dab7047b28),
501    pointer_default(unique)
502]
503interface IActiveScriptParseProcedure2_64 : IActiveScriptParseProcedure64
504{
505}
506
507cpp_quote("#ifdef _WIN64")
508cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_64")
509cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_64")
510cpp_quote("#else")
511cpp_quote("#define IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_32")
512cpp_quote("#define IID_IActiveScriptParseProcedure2 IID_IActiveScriptParseProcedure2_32")
513cpp_quote("#endif")
514
515[
516object,
517uuid(63CDBCB0-C1B1-11d0-9336-00A0C90DCAA9),
518pointer_default(unique)
519]
520interface IBindEventHandler : IUnknown
521{
522    HRESULT BindHandler(
523            [in] LPCOLESTR pstrEvent,
524            [in] IDispatch *pdisp
525    );
526}
527
528[
529object,
530uuid(B8DA6310-E19B-11d0-933C-00A0C90DCAA9),
531pointer_default(unique)
532]
533interface IActiveScriptStats : IUnknown
534{
535    HRESULT GetStat(
536            [in] DWORD stid,
537            [out] ULONG *pluHi,
538            [out] ULONG *pluLo
539    );
540
541    HRESULT GetStatEx(
542            [in] REFGUID guid,
543            [out] ULONG *pluHi,
544            [out] ULONG *pluLo
545    );
546
547    HRESULT ResetStats(void);
548}
549
550[
551    object,
552    uuid(4954e0d0-fbc7-11d1-8410-006008c3fbfc),
553    pointer_default(unique)
554]
555interface IActiveScriptProperty : IUnknown
556{
557    HRESULT GetProperty(
558            [in] DWORD dwProperty,
559            [in] VARIANT *pvarIndex,
560            [out] VARIANT *pvarValue);
561
562    HRESULT SetProperty(
563            [in] DWORD dwProperty,
564            [in] VARIANT *pvarIndex,
565            [in] VARIANT *pvarValue);
566}
567
568[
569    object,
570    uuid(6aa2c4a0-2b53-11d4-a2a0-00104bd35090),
571    pointer_default(unique)
572]
573interface IActiveScriptGarbageCollector : IUnknown
574{
575    HRESULT CollectGarbage(
576            [in] SCRIPTGCTYPE gctype);
577}
578