2 * Copyright 2008 Jacek Caban for CodeWeavers
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
20 import
"activscp.idl";
21 /* import "dbgprop.idl"; */
23 interface IDebugDocumentContext
;
24 interface IRemoteDebugApplication
;
25 interface IEnumDebugCodeContexts
;
28 interface IEnumDebugStackFrames
;
29 interface IDebugStackFrame
;
30 interface IApplicationDebugger
;
31 interface IEnumRemoteDebugApplicationThreads
;
32 interface IDebugApplicationNode
;
33 interface IEnumDebugExpressionContexts
;
34 interface IDebugApplicationThread
;
35 interface IDebugSyncOperation
;
36 interface IDebugAsyncOperation
;
37 interface IDebugStackFrameSniffer
;
38 interface IDebugThreadCall32
;
39 interface IActiveScriptErrorDebug
;
40 interface IProvideExpressionContexts
;
42 typedef enum tagBREAKPOINT_STATE
{
48 typedef DWORD APPBREAKFLAGS
;
50 typedef enum tagBREAKREASON
{
52 BREAKREASON_BREAKPOINT
,
53 BREAKREASON_DEBUGGER_BLOCK
,
54 BREAKREASON_HOST_INITIATED
,
55 BREAKREASON_LANGUAGE_INITIATED
,
56 BREAKREASON_DEBUGGER_HALT
,
61 typedef enum tagBREAKRESUME_ACTION
{
62 BREAKRESUMEACTION_ABORT
,
63 BREAKRESUMEACTION_CONTINUE
,
64 BREAKRESUMEACTION_STEP_INTO
,
65 BREAKRESUMEACTION_STEP_OVER
,
66 BREAKRESUMEACTION_STEP_OUT
,
67 BREAKRESUMEACTION_IGNORE
70 typedef enum tagDOCUMENTNAMETYPE
{
71 DOCUMENTNAMETYPE_APPNODE
,
72 DOCUMENTNAMETYPE_TITLE
,
73 DOCUMENTNAMETYPE_FILE_TAIL
,
77 typedef enum tagERRORRESUMEACTION
{
78 ERRORRESUMEACTION_ReexecuteErrorStatement
,
79 ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller
,
80 ERRORRESUMEACTION_SkipErrorStatement
,
83 typedef WORD SOURCE_TEXT_ATTR
;
86 enum enum_SOURCE_TEXT_ATTR
88 SOURCETEXT_ATTR_KEYWORD
= 0x01,
89 SOURCETEXT_ATTR_COMMENT
= 0x02,
90 SOURCETEXT_ATTR_NONSOURCE
= 0x04,
91 SOURCETEXT_ATTR_OPERATOR
= 0x08,
92 SOURCETEXT_ATTR_NUMBER
= 0x10,
93 SOURCETEXT_ATTR_STRING
= 0x20,
94 SOURCETEXT_ATTR_FUNCTION_START
= 0x40
98 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_KEYWORD
= 0x01;
99 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_COMMENT
= 0x02;
100 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_NONSOURCE
= 0x04;
101 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_OPERATOR
= 0x08;
102 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_NUMBER
= 0x10;
103 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_STRING
= 0x20;
104 const SOURCE_TEXT_ATTR SOURCETEXT_ATTR_FUNCTION_START
= 0x40;
106 /************************************************************
107 * interface IActiveScriptDebug32
111 uuid(51973c10
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
112 pointer_default(unique)
114 interface IActiveScriptDebug32
: IUnknown
116 HRESULT GetScriptTextAttributes
(
117 [in, size_is(uNumCodeChars
)] LPCOLESTR pstrCode
,
118 [in] ULONG uNumCodeChars
,
119 [in] LPCOLESTR pstrDelimiter
,
121 [in, out, size_is(uNumCodeChars
)] SOURCE_TEXT_ATTR
*pattr
);
123 HRESULT GetScriptletTextAttributes
(
124 [in, size_is(uNumCodeChars
)] LPCOLESTR pstrCode
,
125 [in] ULONG uNumCodeChars
,
126 [in] LPCOLESTR pstrDelimiter
,
128 [in, out, size_is(uNumCodeChars
)] SOURCE_TEXT_ATTR
*pattr
);
130 HRESULT EnumCodeContextsOfPosition
(
131 [in] DWORD dwSourceContext
,
132 [in] ULONG uCharacterOffset
,
133 [in] ULONG uNumChars
,
134 [out] IEnumDebugCodeContexts
**ppescc
);
139 uuid(bc437e23
-f5b8
-47f4
-bb79
-7d1ce5483b86
),
140 pointer_default(unique)
142 interface IActiveScriptDebug64
: IUnknown
144 HRESULT GetScriptTextAttributes
(
145 [in, size_is(uNumCodeChars
)] LPCOLESTR pstrCode
,
146 [in] ULONG uNumCodeChars
,
147 [in] LPCOLESTR pstrDelimiter
,
149 [in, out, size_is(uNumCodeChars
)] SOURCE_TEXT_ATTR
*pattr
);
151 HRESULT GetScriptletTextAttributes
(
152 [in, size_is(uNumCodeChars
)] LPCOLESTR pstrCode
,
153 [in] ULONG uNumCodeChars
,
154 [in] LPCOLESTR pstrDelimiter
,
156 [in, out, size_is(uNumCodeChars
)] SOURCE_TEXT_ATTR
*pattr
);
158 HRESULT EnumCodeContextsOfPosition
(
159 [in] DWORDLONG dwSourceContext
,
160 [in] ULONG uCharacterOffset
,
161 [in] ULONG uNumChars
,
162 [out] IEnumDebugCodeContexts
**ppescc
);
165 /************************************************************
166 * interface IDebugDocumentInfo
170 uuid(51973c1f
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
171 pointer_default(unique)
173 interface IDebugDocumentInfo
: IUnknown
176 [in] DOCUMENTNAMETYPE dnt
,
177 [out] BSTR *pbstrName
);
179 HRESULT GetDocumentClassId
(
180 [out] CLSID
*pclsidDocument
);
183 /************************************************************
184 * interface IDebugDocument
188 uuid(51973c21
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
189 pointer_default(unique)
191 interface IDebugDocument
: IDebugDocumentInfo
195 /************************************************************
196 * interface IDebugCodeContext
200 uuid(51973c13
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
201 pointer_default(unique)
203 interface IDebugCodeContext
: IUnknown
205 HRESULT GetDocumentContext
(
206 [out] IDebugDocumentContext
**ppsc
);
208 HRESULT SetBreakPoint
(
209 [in] BREAKPOINT_STATE bps
);
212 /************************************************************
213 * interface IEnumDebugCodeContexts
217 uuid(51973c1d
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
218 pointer_default(unique)
220 interface IEnumDebugCodeContexts
: IUnknown
224 [out] IDebugCodeContext
**pscc
,
225 [out] ULONG
*pceltFetched
);
233 [out] IEnumDebugCodeContexts
**ppescc
);
236 /************************************************************
237 * interface IDebugDocumentContext
241 uuid(51973c28
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
242 pointer_default(unique)
244 interface IDebugDocumentContext
: IUnknown
247 [out] IDebugDocument
**ppsd
);
249 HRESULT EnumCodeContexts
(
250 [out] IEnumDebugCodeContexts
**ppescc
);
253 /************************************************************
254 * interface IRemoteDebugApplicationThread
258 uuid(51973c37
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
259 pointer_default(unique)
261 interface IRemoteDebugApplicationThread
: IUnknown
263 HRESULT GetSystemThreadId
(
264 [out] DWORD
*dwThreadId
);
266 HRESULT GetApplication
(
267 [out] IRemoteDebugApplication
**pprda
);
269 HRESULT EnumStackFrames
(
270 [out] IEnumDebugStackFrames
**ppedsf
);
272 HRESULT GetDescription
(
273 [out] BSTR *pbstrDescription
,
274 [out] BSTR *pbstrState
);
276 HRESULT SetNextStatement
(
277 [in] IDebugStackFrame
*pStackFrame
,
278 [in] IDebugCodeContext
*pCodeContext
);
281 [out] DWORD
*pState
);
284 [out] DWORD
*pdwCount
);
287 [out] DWORD
*pdwCount
);
289 HRESULT GetSuspendCount
(
290 [out] DWORD
*pdwCount
);
293 /************************************************************
294 * interface IRemoteDebugApplication
298 uuid(51973c30
-cb0c
-11d0
-b5c9
-00a0244Aae7a
),
299 pointer_default(unique)
301 interface IRemoteDebugApplication
: IUnknown
303 HRESULT ResumeFromBreakPoint
(
304 [in] IRemoteDebugApplicationThread
*prptFocus
,
305 [in] BREAKRESUMEACTION bra
,
306 [in] ERRORRESUMEACTION era
);
308 HRESULT CauseBreak
();
310 HRESULT ConnectDebugger
(
311 [in] IApplicationDebugger
*pad
);
313 HRESULT DisconnectDebugger
();
316 [out] IApplicationDebugger
**pad
);
318 HRESULT CreateInstanceAtApplication
(
319 [in] REFCLSID rclsid
,
320 [in] IUnknown
*pUnkOuter
,
321 [in] DWORD dwClsContext
,
323 [out, iid_is(riid
)] IUnknown
**ppvObject
);
325 HRESULT QueryAlive
();
328 [out] IEnumRemoteDebugApplicationThreads
**pperdat
);
331 [out] BSTR *pbstrName
);
334 [out] IDebugApplicationNode
**ppdanRoot
);
336 HRESULT EnumGlobalExpressionContexts
(
337 [out] IEnumDebugExpressionContexts
**ppedec
);
340 /************************************************************
341 * interface IDebugApplication32
345 uuid(51973c32
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
346 pointer_default(unique),
349 interface IDebugApplication32
: IRemoteDebugApplication
352 [in] LPCOLESTR pstrName
);
354 HRESULT StepOutComplete
();
357 [in] LPCOLESTR pstr
);
359 HRESULT StartDebugSession
();
361 HRESULT HandleBreakPoint
(
363 [out] BREAKRESUMEACTION
*pbra
);
367 HRESULT GetBreakFlags
(
368 [out] APPBREAKFLAGS
*pabf
,
369 [out] IRemoteDebugApplicationThread
**pprdatSteppingThread
);
371 HRESULT GetCurrentThread
(
372 [out] IDebugApplicationThread
**pat
);
374 HRESULT CreateAsyncDebugOperation
(
375 [in] IDebugSyncOperation
*psdo
,
376 [out] IDebugAsyncOperation
**ppado
);
378 HRESULT AddStackFrameSniffer
(
379 [in] IDebugStackFrameSniffer
*pdsfs
,
380 [out] DWORD
*pdwCookie
);
382 HRESULT RemoveStackFrameSniffer
(
383 [in] DWORD dwCookie
);
385 HRESULT QueryCurrentThreadIsDebuggerThread
();
387 HRESULT SynchronousCallInDebuggerThread
(
388 [in] IDebugThreadCall32
*pptc
,
391 [in] DWORD dwParam3
);
393 HRESULT CreateApplicationNode
(
394 [out] IDebugApplicationNode
**ppdanNew
);
396 HRESULT FireDebuggerEvent
(
398 [in] IUnknown
*punk
);
400 HRESULT HandleRuntimeError
(
401 [in] IActiveScriptErrorDebug
*pErrorDebug
,
402 [in] IActiveScriptSite
*pScriptSite
,
403 [out] BREAKRESUMEACTION
*pbra
,
404 [out] ERRORRESUMEACTION
*perra
,
405 [out] BOOL
*pfCallOnScriptError
);
409 BOOL FIsAutoJitDebugEnabled
();
411 HRESULT AddGlobalExpressionContextProvider
(
412 [in] IProvideExpressionContexts
*pdsfs
,
413 [out] DWORD
*pdwCookie
);
415 HRESULT RemoveGlobalExpressionContextProvider
(
416 [in] DWORD dwCookie
);
419 /************************************************************
420 * interface IDebugApplication64
424 uuid(4dedc754
-04c7
-4f10
-9e60
-16a390fe6e62
),
425 pointer_default(unique),
428 interface IDebugApplication64
: IRemoteDebugApplication
431 [in] LPCOLESTR pstrName
);
433 HRESULT StepOutComplete
();
436 [in] LPCOLESTR pstr
);
438 HRESULT StartDebugSession
();
440 HRESULT HandleBreakPoint
(
442 [out] BREAKRESUMEACTION
*pbra
);
446 HRESULT GetBreakFlags
(
447 [out] APPBREAKFLAGS
*pabf
,
448 [out] IRemoteDebugApplicationThread
**pprdatSteppingThread
);
450 HRESULT GetCurrentThread
(
451 [out] IDebugApplicationThread
**pat
);
453 HRESULT CreateAsyncDebugOperation
(
454 [in] IDebugSyncOperation
*psdo
,
455 [out] IDebugAsyncOperation
**ppado
);
457 HRESULT AddStackFrameSniffer
(
458 [in] IDebugStackFrameSniffer
*pdsfs
,
459 [out] DWORD
*pdwCookie
);
461 HRESULT RemoveStackFrameSniffer
(
462 [in] DWORD dwCookie
);
464 HRESULT QueryCurrentThreadIsDebuggerThread
();
466 HRESULT SynchronousCallInDebuggerThread
(
467 [in] IDebugThreadCall32
*pptc
,
468 [in] DWORDLONG dwParam1
,
469 [in] DWORDLONG dwParam2
,
470 [in] DWORDLONG dwParam3
);
472 HRESULT CreateApplicationNode
(
473 [out] IDebugApplicationNode
**ppdanNew
);
475 HRESULT FireDebuggerEvent
(
477 [in] IUnknown
*punk
);
479 HRESULT HandleRuntimeError
(
480 [in] IActiveScriptErrorDebug
*pErrorDebug
,
481 [in] IActiveScriptSite
*pScriptSite
,
482 [out] BREAKRESUMEACTION
*pbra
,
483 [out] ERRORRESUMEACTION
*perra
,
484 [out] BOOL
*pfCallOnScriptError
);
488 BOOL FIsAutoJitDebugEnabled
();
490 HRESULT AddGlobalExpressionContextProvider
(
491 [in] IProvideExpressionContexts
*pdsfs
,
492 [out] DWORDLONG
*pdwCookie
);
494 HRESULT RemoveGlobalExpressionContextProvider
(
495 [in] DWORDLONG dwCookie
);
498 /************************************************************
499 * interface IActiveScriptSiteDebug32
503 uuid(51973c11
-cb0c
-11d0
-b5c9
-00a0244a0e7a
),
504 pointer_default(unique),
507 interface IActiveScriptSiteDebug32
: IUnknown
509 HRESULT GetDocumentContextFromPosition
(
510 [in] DWORD dwSourceContext
,
511 [in] ULONG uCharacterOffset
,
512 [in] ULONG uNumChars
,
513 [out] IDebugDocumentContext
**ppsc
);
515 HRESULT GetApplication
(
516 [out] IDebugApplication32
**ppda
);
518 HRESULT GetRootApplicationNode
(
519 [out] IDebugApplicationNode
**ppdanRoot
);
521 HRESULT OnScriptErrorDebug
(
522 [in] IActiveScriptErrorDebug
*pErrorDebug
,
523 [out] BOOL
*pfEnterDebugger
,
524 [out] BOOL
*pfCallOnScriptErrorWhenContinuing
);
527 /************************************************************
528 * interface IActiveScriptSiteDebug64
532 uuid(d6b96b0a
-7463-402c
-92ac
-89984226942f
),
533 pointer_default(unique),
536 interface IActiveScriptSiteDebug64
: IUnknown
538 HRESULT GetDocumentContextFromPosition
(
539 [in] DWORDLONG dwSourceContext
,
540 [in] ULONG uCharacterOffset
,
541 [in] ULONG uNumChars
,
542 [out] IDebugDocumentContext
**ppsc
);
544 HRESULT GetApplication
(
545 [out] IDebugApplication64
**ppda
);
547 HRESULT GetRootApplicationNode
(
548 [out] IDebugApplicationNode
**ppdanRoot
);
550 HRESULT OnScriptErrorDebug
(
551 [in] IActiveScriptErrorDebug
*pErrorDebug
,
552 [out] BOOL
*pfEnterDebugger
,
553 [out] BOOL
*pfCallOnScriptErrorWhenContinuing
);
556 cpp_quote
("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS")
557 cpp_quote
("#ifdef _WIN64")
559 cpp_quote
("#define IActiveScriptDebug IActiveScriptDebug64")
560 cpp_quote
("#define IID_IActiveScriptDebug IID_IActiveScriptDebug64")
562 cpp_quote
("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64")
563 cpp_quote
("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64")
565 cpp_quote
("#define IDebugApplication IDebugApplication64")
566 cpp_quote
("#define IID_IDebugApplication IID_IDebugApplication64")
570 cpp_quote
("#define IActiveScriptDebug IActiveScriptDebug32")
571 cpp_quote
("#define IID_IActiveScriptDebug IID_IActiveScriptDebug32")
573 cpp_quote
("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32")
574 cpp_quote
("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32")
576 cpp_quote
("#define IDebugApplication IDebugApplication32")
577 cpp_quote
("#define IID_IDebugApplication IID_IDebugApplication32")