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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 typedef enum tagSCRIPTSTATE
{
24 SCRIPTSTATE_UNINITIALIZED
= 0,
25 SCRIPTSTATE_STARTED
= 1,
26 SCRIPTSTATE_CONNECTED
= 2,
27 SCRIPTSTATE_DISCONNECTED
= 3,
28 SCRIPTSTATE_CLOSED
= 4,
29 SCRIPTSTATE_INITIALIZED
= 5
32 typedef enum tagSCRIPTTHREADSTATE
{
33 SCRIPTTHREADSTATE_NOTINSCRIPT
= 0,
34 SCRIPTTHREADSTATE_RUNNING
= 1
37 typedef DWORD SCRIPTTHREADID
;
38 cpp_quote
("#define SCRIPTTHREADID_CURRENT ((SCRIPTTHREADID)-1)")
39 cpp_quote
("#define SCRIPTTHREADID_BASE ((SCRIPTTHREADID)-2)")
40 cpp_quote
("#define SCRIPTTHREADID_ALL ((SCRIPTTHREADID)-3)")
42 cpp_quote
("#define SCRIPTITEM_ISVISIBLE 0x00000002")
43 cpp_quote
("#define SCRIPTITEM_ISSOURCE 0x00000004")
44 cpp_quote
("#define SCRIPTITEM_GLOBALMEMBERS 0x00000008")
45 cpp_quote
("#define SCRIPTITEM_ISPERSISTENT 0x00000040")
46 cpp_quote
("#define SCRIPTITEM_CODEONLY 0x00000200")
47 cpp_quote
("#define SCRIPTITEM_NOCODE 0x00000400")
48 cpp_quote
("#define SCRIPTITEM_ALL_FLAGS (SCRIPTITEM_ISSOURCE | \\")
49 cpp_quote
(" SCRIPTITEM_ISVISIBLE | \\")
50 cpp_quote
(" SCRIPTITEM_ISPERSISTENT | \\")
51 cpp_quote
(" SCRIPTITEM_GLOBALMEMBERS | \\")
52 cpp_quote
(" SCRIPTITEM_NOCODE | \\")
53 cpp_quote
(" SCRIPTITEM_CODEONLY)")
54 cpp_quote
("#define SCRIPTTYPELIB_ISCONTROL 0x00000010")
55 cpp_quote
("#define SCRIPTTYPELIB_ISPERSISTENT 0x00000040")
56 cpp_quote
("#define SCRIPTTYPELIB_ALL_FLAGS (SCRIPTTEXT_ISCONTROL | SCRIPTTYPELIB_ISPERSISTENT)")
57 cpp_quote
("#define SCRIPTTEXT_DELAYEXECUTION 0x00000001")
58 cpp_quote
("#define SCRIPTTEXT_ISVISIBLE 0x00000002")
59 cpp_quote
("#define SCRIPTTEXT_ISEXPRESSION 0x00000020")
60 cpp_quote
("#define SCRIPTTEXT_ISPERSISTENT 0x00000040")
61 cpp_quote
("#define SCRIPTTEXT_HOSTMANAGESSOURCE 0x00000080")
62 cpp_quote
("#define SCRIPTTEXT_ALL_FLAGS (SCRIPTTEXT_DELAYEXECUTION | \\")
63 cpp_quote
(" SCRIPTTEXT_ISVISIBLE | \\")
64 cpp_quote
(" SCRIPTTEXT_ISEXPRESSION | \\")
65 cpp_quote
(" SCRIPTTEXT_ISPERSISTENT | \\")
66 cpp_quote
(" SCRIPTTEXT_HOSTMANAGESSOURCE)")
67 cpp_quote
("#define SCRIPTPROC_HOSTMANAGESSOURCE 0x00000080")
68 cpp_quote
("#define SCRIPTPROC_IMPLICIT_THIS 0x00000100")
69 cpp_quote
("#define SCRIPTPROC_IMPLICIT_PARENTS 0x00000200")
70 cpp_quote
("#define SCRIPTPROC_ALL_FLAGS (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
71 cpp_quote
(" SCRIPTPROC_IMPLICIT_THIS | \\")
72 cpp_quote
(" SCRIPTPROC_IMPLICIT_PARENTS)")
73 cpp_quote
("#define SCRIPTINFO_IUNKNOWN 0x00000001")
74 cpp_quote
("#define SCRIPTINFO_ITYPEINFO 0x00000002")
75 cpp_quote
("#define SCRIPTINFO_ALL_FLAGS (SCRIPTINFO_IUNKNOWN | SCRIPTINFO_ITYPEINFO)")
76 cpp_quote
("#define SCRIPTINTERRUPT_DEBUG 0x00000001")
77 cpp_quote
("#define SCRIPTINTERRUPT_RAISEEXCEPTION 0x00000002")
78 cpp_quote
("#define SCRIPTINTERRUPT_ALL_FLAGS (SCRIPTINTERRUPT_DEBUG | SCRIPTINTERRUPT_RAISEEXCEPTION)")
79 cpp_quote
("#define SCRIPTSTAT_STATEMENT_COUNT 1")
80 cpp_quote
("#define SCRIPTSTAT_INSTRUCTION_COUNT 2")
81 cpp_quote
("#define SCRIPTSTAT_INTSTRUCTION_TIME 3")
82 cpp_quote
("#define SCRIPTSTAT_TOTAL_TIME 4")
86 uuid(EAE1BA61
-A4ED
-11cf
-8F20
-00805F2CD064
),
87 pointer_default(unique)
89 interface IActiveScriptError
: IUnknown
91 HRESULT GetExceptionInfo
(
92 [out] EXCEPINFO
*pexcepinfo
95 HRESULT GetSourcePosition
(
96 [out] DWORD
*pdwSourceContext
,
97 [out] ULONG
*pulLineNumber
,
98 [out] LONG *plCharacterPosition
101 HRESULT GetSourceLineText
(
102 [out] BSTR *pbstrSourceLine
108 uuid(DB01A1E3
-A42B
-11cf
-8F20
-00805F2CD064
),
109 pointer_default(unique)
111 interface IActiveScriptSite
: IUnknown
117 [in] LPCOLESTR pstrName
,
118 [in] DWORD dwReturnMask
,
119 [out] IUnknown
**ppiunkItem
,
120 [out] ITypeInfo
**ppti
123 HRESULT GetDocVersionString
(
124 [out] BSTR *pbstrVersion
127 HRESULT OnScriptTerminate
(
128 [in] const VARIANT *pvarResult
,
129 [in] const EXCEPINFO
*pexcepinfo
132 HRESULT OnStateChange
(
133 [in] SCRIPTSTATE ssScriptState
136 HRESULT OnScriptError
(
137 [in] IActiveScriptError
*pscripterror
140 HRESULT OnEnterScript
(void);
142 HRESULT OnLeaveScript
(void);
145 cpp_quote
("typedef IActiveScriptSite *PIActiveScriptSite;")
149 uuid(D10F6761
-83E9
-11cf
-8F20
-00805F2CD064
),
150 pointer_default(unique)
152 interface IActiveScriptSiteWindow
: IUnknown
158 HRESULT EnableModeless
(
165 uuid(539698A0
-CDCA
-11CF
-A5EB
-00AA0047A063
),
166 pointer_default(unique)
168 interface IActiveScriptSiteInterruptPoll
: IUnknown
170 HRESULT QueryContinue
();
175 uuid(BB1A2AE1
-A4F9
-11cf
-8F20
-00805F2CD064
),
176 pointer_default(unique)
178 interface IActiveScript
: IUnknown
180 HRESULT SetScriptSite
(
181 [in] IActiveScriptSite
*pass
184 HRESULT GetScriptSite
(
186 [out, iid_is(riid
)] void **ppvObject
189 HRESULT SetScriptState
(
193 HRESULT GetScriptState
(
194 [out] SCRIPTSTATE
*pssState
199 HRESULT AddNamedItem
(
200 [in] LPCOLESTR pstrName
,
205 [in] REFGUID rguidTypeLib
,
211 HRESULT GetScriptDispatch
(
212 [in] LPCOLESTR pstrItemName
,
213 [out] IDispatch
**ppdisp
216 HRESULT GetCurrentScriptThreadID
(
217 [out] SCRIPTTHREADID
*pstidThread
220 HRESULT GetScriptThreadID
(
221 [in] DWORD dwWin32ThreadId
,
222 [out] SCRIPTTHREADID
*pstidThread
225 HRESULT GetScriptThreadState
(
226 [in] SCRIPTTHREADID stidThread
,
227 [out] SCRIPTTHREADSTATE
*pstsState
230 HRESULT InterruptScriptThread
(
231 [in] SCRIPTTHREADID stidThread
,
232 [in] const EXCEPINFO
*pexcepinfo
,
237 [out] IActiveScript
**ppscript
241 cpp_quote
("typedef IActiveScript *PIActiveScript;")
245 uuid(BB1A2AE2
-A4F9
-11cf
-8F20
-00805F2CD064
),
246 pointer_default(unique)
248 interface IActiveScriptParse
: IUnknown
250 HRESULT InitNew
(void);
252 HRESULT AddScriptlet
(
253 [in] LPCOLESTR pstrDefaultName
,
254 [in] LPCOLESTR pstrCode
,
255 [in] LPCOLESTR pstrItemName
,
256 [in] LPCOLESTR pstrSubItemName
,
257 [in] LPCOLESTR pstrEventName
,
258 [in] LPCOLESTR pstrDelimiter
,
259 [in] DWORD dwSourceContextCookie
,
260 [in] ULONG ulStartingLineNumber
,
262 [out] BSTR *pbstrName
,
263 [out] EXCEPINFO
*pexcepinfo
266 HRESULT ParseScriptText
(
267 [in] LPCOLESTR pstrCode
,
268 [in] LPCOLESTR pstrItemName
,
269 [in] IUnknown
*punkContext
,
270 [in] LPCOLESTR pstrDelimiter
,
271 [in] DWORD dwSourceContextCookie
,
272 [in] ULONG ulStartingLineNumber
,
274 [out] VARIANT *pvarResult
,
275 [out] EXCEPINFO
*pexcepinfo
279 cpp_quote
("typedef IActiveScriptParse *PIActiveScriptParse;")
283 uuid(1CFF0050
-6FDD
-11d0
-9328-00A0C90DCAA9
),
284 pointer_default(unique)
286 interface IActiveScriptParseProcedureOld
: IUnknown
288 HRESULT ParseProcedureText
(
289 [in] LPCOLESTR pstrCode
,
290 [in] LPCOLESTR pstrFormalParams
,
291 [in] LPCOLESTR pstrItemName
,
292 [in] IUnknown
*punkContext
,
293 [in] LPCOLESTR pstrDelimiter
,
294 [in] DWORD dwSourceContextCookie
,
295 [in] ULONG ulStartingLineNumber
,
297 [out] IDispatch
**ppdisp
303 uuid(AA5B6A80
-B834
-11d0
-932F
-00A0C90DCAA9
),
304 pointer_default(unique)
306 interface IActiveScriptParseProcedure
: IUnknown
308 HRESULT ParseProcedureText
(
309 [in] LPCOLESTR pstrCode
,
310 [in] LPCOLESTR pstrFormalParams
,
311 [in] LPCOLESTR pstrProcedureName
,
312 [in] LPCOLESTR pstrItemName
,
313 [in] IUnknown
*punkContext
,
314 [in] LPCOLESTR pstrDelimiter
,
315 [in] DWORD dwSourceContextCookie
,
316 [in] ULONG ulStartingLineNumber
,
318 [out] IDispatch
**ppdisp
324 uuid(63CDBCB0
-C1B1
-11d0
-9336-00A0C90DCAA9
),
325 pointer_default(unique)
327 interface IBindEventHandler
: IUnknown
330 [in] LPCOLESTR pstrEvent
,
331 [in] IDispatch
*pdisp
337 uuid(B8DA6310
-E19B
-11d0
-933C
-00A0C90DCAA9
),
338 pointer_default(unique)
340 interface IActiveScriptStats
: IUnknown
354 HRESULT ResetStats
(void);