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
25 typedef enum tagSCRIPTSTATE
{
26 SCRIPTSTATE_UNINITIALIZED
= 0,
27 SCRIPTSTATE_STARTED
= 1,
28 SCRIPTSTATE_CONNECTED
= 2,
29 SCRIPTSTATE_DISCONNECTED
= 3,
30 SCRIPTSTATE_CLOSED
= 4,
31 SCRIPTSTATE_INITIALIZED
= 5
34 typedef enum tagSCRIPTTHREADSTATE
{
35 SCRIPTTHREADSTATE_NOTINSCRIPT
= 0,
36 SCRIPTTHREADSTATE_RUNNING
= 1
39 typedef DWORD SCRIPTTHREADID
;
40 cpp_quote
("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
41 cpp_quote
("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
42 cpp_quote
("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
44 cpp_quote
("#define SCRIPTITEM_ISVISIBLE 0x00000002")
45 cpp_quote
("#define SCRIPTITEM_ISSOURCE 0x00000004")
46 cpp_quote
("#define SCRIPTITEM_GLOBALMEMBERS 0x00000008")
47 cpp_quote
("#define SCRIPTITEM_ISPERSISTENT 0x00000040")
48 cpp_quote
("#define SCRIPTITEM_CODEONLY 0x00000200")
49 cpp_quote
("#define SCRIPTITEM_NOCODE 0x00000400")
50 cpp_quote
("#define SCRIPTITEM_ALL_FLAGS (SCRIPTITEM_ISSOURCE | \\")
51 cpp_quote
(" SCRIPTITEM_ISVISIBLE | \\")
52 cpp_quote
(" SCRIPTITEM_ISPERSISTENT | \\")
53 cpp_quote
(" SCRIPTITEM_GLOBALMEMBERS | \\")
54 cpp_quote
(" SCRIPTITEM_NOCODE | \\")
55 cpp_quote
(" SCRIPTITEM_CODEONLY)")
56 cpp_quote
("#define SCRIPTTYPELIB_ISCONTROL 0x00000010")
57 cpp_quote
("#define SCRIPTTYPELIB_ISPERSISTENT 0x00000040")
58 cpp_quote
("#define SCRIPTTYPELIB_ALL_FLAGS (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
59 cpp_quote
("#define SCRIPTTEXT_DELAYEXECUTION 0x00000001")
60 cpp_quote
("#define SCRIPTTEXT_ISVISIBLE 0x00000002")
61 cpp_quote
("#define SCRIPTTEXT_ISEXPRESSION 0x00000020")
62 cpp_quote
("#define SCRIPTTEXT_ISPERSISTENT 0x00000040")
63 cpp_quote
("#define SCRIPTTEXT_HOSTMANAGESSOURCE 0x00000080")
64 cpp_quote
("#define SCRIPTTEXT_ALL_FLAGS (SCRIPTTEXT_DELAYEXECUTION | \\")
65 cpp_quote
(" SCRIPTTEXT_ISVISIBLE | \\")
66 cpp_quote
(" SCRIPTTEXT_ISEXPRESSION | \\")
67 cpp_quote
(" SCRIPTTEXT_ISPERSISTENT | \\")
68 cpp_quote
(" SCRIPTTEXT_HOSTMANAGESSOURCE)")
69 cpp_quote
("#define SCRIPTPROC_HOSTMANAGESSOURCE 0x00000080")
70 cpp_quote
("#define SCRIPTPROC_IMPLICIT_THIS 0x00000100")
71 cpp_quote
("#define SCRIPTPROC_IMPLICIT_PARENTS 0x00000200")
72 cpp_quote
("#define SCRIPTPROC_ALL_FLAGS (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
73 cpp_quote
(" SCRIPTPROC_IMPLICIT_THIS | \\")
74 cpp_quote
(" SCRIPTPROC_IMPLICIT_PARENTS)")
75 cpp_quote
("#define SCRIPTINFO_IUNKNOWN 0x00000001")
76 cpp_quote
("#define SCRIPTINFO_ITYPEINFO 0x00000002")
77 cpp_quote
("#define SCRIPTINFO_ALL_FLAGS (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
78 cpp_quote
("#define SCRIPTINTERRUPT_DEBUG 0x00000001")
79 cpp_quote
("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
80 cpp_quote
("#define SCRIPTINTERRUPT_ALL_FLAGS (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
81 cpp_quote
("#define SCRIPTSTAT_STATEMENT_COUNT 1")
82 cpp_quote
("#define SCRIPTSTAT_INSTRUCTION_COUNT 2")
83 cpp_quote
("#define SCRIPTSTAT_INTSTRUCTION_TIME 3")
84 cpp_quote
("#define SCRIPTSTAT_TOTAL_TIME 4")
88 uuid(EAE1BA61
-A4ED
-11cf
-8F20
-00805F2CD064
),
89 pointer_default(unique)
91 interface IActiveScriptError
: IUnknown
93 HRESULT GetExceptionInfo
(
94 [out] EXCEPINFO
*pexcepinfo
97 HRESULT GetSourcePosition
(
98 [out] DWORD
*pdwSourceContext
,
99 [out] ULONG
*pulLineNumber
,
100 [out] LONG *plCharacterPosition
103 HRESULT GetSourceLineText
(
104 [out] BSTR *pbstrSourceLine
110 uuid(DB01A1E3
-A42B
-11cf
-8F20
-00805F2CD064
),
111 pointer_default(unique)
113 interface IActiveScriptSite
: IUnknown
119 [in] LPCOLESTR pstrName
,
120 [in] DWORD dwReturnMask
,
121 [out] IUnknown
**ppiunkItem
,
122 [out] ITypeInfo
**ppti
125 HRESULT GetDocVersionString
(
126 [out] BSTR *pbstrVersion
129 HRESULT OnScriptTerminate
(
130 [in] const VARIANT *pvarResult
,
131 [in] const EXCEPINFO
*pexcepinfo
134 HRESULT OnStateChange
(
135 [in] SCRIPTSTATE ssScriptState
138 HRESULT OnScriptError
(
139 [in] IActiveScriptError
*pscripterror
142 HRESULT OnEnterScript
(void);
144 HRESULT OnLeaveScript
(void);
147 cpp_quote
("typedef IActiveScriptSite *PIActiveScriptSite;")
151 uuid(D10F6761
-83E9
-11cf
-8F20
-00805F2CD064
),
152 pointer_default(unique)
154 interface IActiveScriptSiteWindow
: IUnknown
160 HRESULT EnableModeless
(
167 uuid(539698A0
-CDCA
-11CF
-A5EB
-00AA0047A063
),
168 pointer_default(unique)
170 interface IActiveScriptSiteInterruptPoll
: IUnknown
172 HRESULT QueryContinue
();
177 uuid(BB1A2AE1
-A4F9
-11cf
-8F20
-00805F2CD064
),
178 pointer_default(unique)
180 interface IActiveScript
: IUnknown
182 HRESULT SetScriptSite
(
183 [in] IActiveScriptSite
*pass
186 HRESULT GetScriptSite
(
188 [out, iid_is(riid
)] void **ppvObject
191 HRESULT SetScriptState
(
195 HRESULT GetScriptState
(
196 [out] SCRIPTSTATE
*pssState
201 HRESULT AddNamedItem
(
202 [in] LPCOLESTR pstrName
,
207 [in] REFGUID rguidTypeLib
,
213 HRESULT GetScriptDispatch
(
214 [in] LPCOLESTR pstrItemName
,
215 [out] IDispatch
**ppdisp
218 HRESULT GetCurrentScriptThreadID
(
219 [out] SCRIPTTHREADID
*pstidThread
222 HRESULT GetScriptThreadID
(
223 [in] DWORD dwWin32ThreadId
,
224 [out] SCRIPTTHREADID
*pstidThread
227 HRESULT GetScriptThreadState
(
228 [in] SCRIPTTHREADID stidThread
,
229 [out] SCRIPTTHREADSTATE
*pstsState
232 HRESULT InterruptScriptThread
(
233 [in] SCRIPTTHREADID stidThread
,
234 [in] const EXCEPINFO
*pexcepinfo
,
239 [out] IActiveScript
**ppscript
243 cpp_quote
("typedef IActiveScript *PIActiveScript;")
247 uuid(BB1A2AE2
-A4F9
-11cf
-8F20
-00805F2CD064
),
248 pointer_default(unique)
250 interface IActiveScriptParse
: IUnknown
252 HRESULT InitNew
(void);
254 HRESULT AddScriptlet
(
255 [in] LPCOLESTR pstrDefaultName
,
256 [in] LPCOLESTR pstrCode
,
257 [in] LPCOLESTR pstrItemName
,
258 [in] LPCOLESTR pstrSubItemName
,
259 [in] LPCOLESTR pstrEventName
,
260 [in] LPCOLESTR pstrDelimiter
,
261 [in] DWORD dwSourceContextCookie
,
262 [in] ULONG ulStartingLineNumber
,
264 [out] BSTR *pbstrName
,
265 [out] EXCEPINFO
*pexcepinfo
268 HRESULT ParseScriptText
(
269 [in] LPCOLESTR pstrCode
,
270 [in] LPCOLESTR pstrItemName
,
271 [in] IUnknown
*punkContext
,
272 [in] LPCOLESTR pstrDelimiter
,
273 [in] DWORD dwSourceContextCookie
,
274 [in] ULONG ulStartingLineNumber
,
276 [out] VARIANT *pvarResult
,
277 [out] EXCEPINFO
*pexcepinfo
281 cpp_quote
("typedef IActiveScriptParse *PIActiveScriptParse;")
285 uuid(1CFF0050
-6FDD
-11d0
-9328-00A0C90DCAA9
),
286 pointer_default(unique)
288 interface IActiveScriptParseProcedureOld
: IUnknown
290 HRESULT ParseProcedureText
(
291 [in] LPCOLESTR pstrCode
,
292 [in] LPCOLESTR pstrFormalParams
,
293 [in] LPCOLESTR pstrItemName
,
294 [in] IUnknown
*punkContext
,
295 [in] LPCOLESTR pstrDelimiter
,
296 [in] DWORD dwSourceContextCookie
,
297 [in] ULONG ulStartingLineNumber
,
299 [out] IDispatch
**ppdisp
305 uuid(AA5B6A80
-B834
-11d0
-932F
-00A0C90DCAA9
),
306 pointer_default(unique)
308 interface IActiveScriptParseProcedure
: IUnknown
310 HRESULT ParseProcedureText
(
311 [in] LPCOLESTR pstrCode
,
312 [in] LPCOLESTR pstrFormalParams
,
313 [in] LPCOLESTR pstrProcedureName
,
314 [in] LPCOLESTR pstrItemName
,
315 [in] IUnknown
*punkContext
,
316 [in] LPCOLESTR pstrDelimiter
,
317 [in] DWORD dwSourceContextCookie
,
318 [in] ULONG ulStartingLineNumber
,
320 [out] IDispatch
**ppdisp
326 uuid(63CDBCB0
-C1B1
-11d0
-9336-00A0C90DCAA9
),
327 pointer_default(unique)
329 interface IBindEventHandler
: IUnknown
332 [in] LPCOLESTR pstrEvent
,
333 [in] IDispatch
*pdisp
339 uuid(B8DA6310
-E19B
-11d0
-933C
-00A0C90DCAA9
),
340 pointer_default(unique)
342 interface IActiveScriptStats
: IUnknown
356 HRESULT ResetStats
(void);