Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / vdfdebug.pkg @ 67

History | View | Annotate | Download (56.5 KB)

1 8 wil
//TH-Header
2
//*****************************************************************************************
3
// Copyright (c)  2013 Antwise Solutions
4
// All rights reserved.
5
//
6
// $FileName    : cDebuggerEngine
7 16 wil
// $ProjectName : Splat ! Vdf Debugger
8 8 wil
// $Authors     : Wil van Antwerpen
9
// $Created     : 12.14.2013  23:42
10
// $Type        : GPLv2
11
//
12
// Contents:
13
// Visual DataFlex COM proxy classes generated from vdfdbg.dll
14
// These have then been hand edited to support multiple versions in one
15 16 wil
// executable.
16 8 wil
// Otherwise we would have need an executable for each vdf version.
17
//
18
// An alternative approach would have been to use the create function and
19
// class name as variables, but then it would not have been possible to subclass
20
// the debugger engine.
21
//
22 16 wil
// Please note that the ActiveX components are the property of Data Access
23 8 wil
// Worldwide and that you will need to have a fully licensed copy of the
24
// development environment installed on your machine for this to work.
25
//
26
//
27
//*****************************************************************************************
28
//TH-RevisionStart
29
//TH-RevisionEnd
30 2 wil
Use FlexCom20.pkg
31
32 8 wil
Define CS_SPLATFATALCAPTION for "Fatal VdfSplat Debug Error"
33 2 wil
34 8 wil
35 2 wil
// WindowType property - Tells what kind of variables will be displayed in the window
36
Define OLEdbgVariableWindows for Integer
37
    Define OLEDBGVARIABLEWINDOW_LOCAL for 0
38
    Define OLEDBGVARIABLEWINDOW_GLOBAL for 1
39
40 16 wil
// CLSID:
41 2 wil
// IDebuggerEngine Interface
42
Class cComIDebuggerEngine is a Mixin
43
44
    // Starts debugging the specified program
45
    Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl
46
        Handle hDispatchDriver
47
        Get phDispatchDriver to hDispatchDriver
48
        Send PrepareParams to hDispatchDriver 3
49
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llcmdLine
50
        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llwebApp
51
        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llurl
52
        Send InvokeComMethod to hDispatchDriver 1 OLE_VT_VOID
53
    End_Procedure
54 16 wil
55
    // DF18.1 version of ComStartProgram, we use different name instead of overload as that technique
56
    // has been declared obsolete.
57
    //
58
    // Starts debugging the specified program
59
    Procedure ComStartProgram181 String llcmdLine Boolean llnoDebugHeap Variant llwebApp Variant llurl
60
        Handle hDispatchDriver
61
        Get phDispatchDriver to hDispatchDriver
62
        Send PrepareParams to hDispatchDriver 4
63
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llcmdLine
64
        Send DefineParam to hDispatchDriver OLE_VT_BOOL llnoDebugHeap
65
        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llwebApp
66
        Send DefineParam to hDispatchDriver OLE_VT_VARIANT llurl
67
        Send InvokeComMethod to hDispatchDriver 1 OLE_VT_VOID
68
    End_Procedure
69 2 wil
70
    // Stops current debugging session
71
    Procedure ComStopProgram
72
        Handle hDispatchDriver
73
        Get phDispatchDriver to hDispatchDriver
74
        Send InvokeComMethod to hDispatchDriver 2 OLE_VT_VOID
75
    End_Procedure
76
77
    // Resumes execution of the debuggee process
78
    Procedure ComContinue
79
        Handle hDispatchDriver
80
        Get phDispatchDriver to hDispatchDriver
81
        Send InvokeComMethod to hDispatchDriver 3 OLE_VT_VOID
82
    End_Procedure
83
84
    // Steps into the next line of code
85
    Procedure ComStepInto
86
        Handle hDispatchDriver
87
        Get phDispatchDriver to hDispatchDriver
88
        Send InvokeComMethod to hDispatchDriver 4 OLE_VT_VOID
89
    End_Procedure
90
91
    // Steps over the next line of code
92
    Procedure ComStepOver
93
        Handle hDispatchDriver
94
        Get phDispatchDriver to hDispatchDriver
95
        Send InvokeComMethod to hDispatchDriver 5 OLE_VT_VOID
96
    End_Procedure
97
98
    // Steps out of the current function call
99
    Procedure ComStepOut
100
        Handle hDispatchDriver
101
        Get phDispatchDriver to hDispatchDriver
102
        Send InvokeComMethod to hDispatchDriver 6 OLE_VT_VOID
103
    End_Procedure
104
105
    // Breaks execution
106
    Procedure ComPause
107
        Handle hDispatchDriver
108
        Get phDispatchDriver to hDispatchDriver
109
        Send InvokeComMethod to hDispatchDriver 7 OLE_VT_VOID
110
    End_Procedure
111
112
    // Sets the specified breakpoint
113
    Function ComSetBreakPoint String llfile UInteger ByRef llline Returns Boolean
114
        Handle hDispatchDriver
115
        Boolean retVal
116
        Get phDispatchDriver to hDispatchDriver
117
        Send PrepareParams to hDispatchDriver 2
118
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
119
        Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_UI4) llline
120
        Get InvokeComMethod of hDispatchDriver 8 OLE_VT_BOOL to retVal
121
        Function_Return retVal
122
    End_Function
123
124
    // Removes the specified breakpoint
125
    Function ComRemoveBreakPoint String llfile UInteger llline Returns Boolean
126
        Handle hDispatchDriver
127
        Boolean retVal
128
        Get phDispatchDriver to hDispatchDriver
129
        Send PrepareParams to hDispatchDriver 2
130
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
131
        Send DefineParam to hDispatchDriver OLE_VT_UI4 llline
132
        Get InvokeComMethod of hDispatchDriver 9 OLE_VT_BOOL to retVal
133
        Function_Return retVal
134
    End_Function
135
136
    // Selects the active callstack entry
137
    Procedure ComSelectActiveQueueLevel Integer llqueueLevel
138
        Handle hDispatchDriver
139
        Get phDispatchDriver to hDispatchDriver
140
        Send PrepareParams to hDispatchDriver 1
141
        Send DefineParam to hDispatchDriver OLE_VT_I4 llqueueLevel
142
        Send InvokeComMethod to hDispatchDriver 10 OLE_VT_VOID
143
    End_Procedure
144
145
    // Evaluates the specified expression
146
    Function ComEval String llexpr String ByRef llresult Returns Boolean
147
        Handle hDispatchDriver
148
        Boolean retVal
149
        Get phDispatchDriver to hDispatchDriver
150
        Send PrepareParams to hDispatchDriver 2
151
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llexpr
152
        Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_BSTR) llresult
153
        Get InvokeComMethod of hDispatchDriver 11 OLE_VT_BOOL to retVal
154
        Function_Return retVal
155
    End_Function
156
157
    // Triggers event OnUpdateView
158
    Procedure ComUpdateViews
159
        Handle hDispatchDriver
160
        Get phDispatchDriver to hDispatchDriver
161
        Send InvokeComMethod to hDispatchDriver 12 OLE_VT_VOID
162
    End_Procedure
163
164
    // Evaluates the specified expression asynchronously
165
    Procedure ComAsyncEval OLE_HANDLE llhWndListener Integer llexprID String llexpression
166
        Handle hDispatchDriver
167
        Get phDispatchDriver to hDispatchDriver
168
        Send PrepareParams to hDispatchDriver 3
169
        Send DefineParam to hDispatchDriver OLE_VT_I4 llhWndListener
170
        Send DefineParam to hDispatchDriver OLE_VT_I4 llexprID
171
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llexpression
172
        Send InvokeComMethod to hDispatchDriver 13 OLE_VT_VOID
173
    End_Procedure
174
175
    // Resumes execution up to the specified line
176
    Procedure ComRunToLine String llfile UInteger llline
177
        Handle hDispatchDriver
178
        Get phDispatchDriver to hDispatchDriver
179
        Send PrepareParams to hDispatchDriver 2
180
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
181
        Send DefineParam to hDispatchDriver OLE_VT_UI4 llline
182
        Send InvokeComMethod to hDispatchDriver 14 OLE_VT_VOID
183
    End_Procedure
184
185
    // Returns the source line from the specified command number
186
    Function ComGetSourceLineFromCommand Integer llcmd Integer ByRef llline Returns String
187
        Handle hDispatchDriver
188
        String retVal
189
        Get phDispatchDriver to hDispatchDriver
190
        Send PrepareParams to hDispatchDriver 2
191
        Send DefineParam to hDispatchDriver OLE_VT_I4 llcmd
192
        Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_I4) llline
193
        Get InvokeComMethod of hDispatchDriver 15 OLE_VT_BSTR to retVal
194
        Function_Return retVal
195
    End_Function
196
197
    // Returns array of all messages in program
198
    Function ComGetAllMessages Returns String[]
199
        Handle hDispatchDriver
200
        String[] retVal
201
        Get phDispatchDriver to hDispatchDriver
202
        Get InvokeComMethod of hDispatchDriver 16 (OLE_VT_ARRAY ior OLE_VT_BSTR) to retVal
203
        Function_Return retVal
204
    End_Function
205
206
    // Returns whether the specified source file is part of the debuggee program
207
    Function ComIsValidSourceFile String llfile Returns Boolean
208
        Handle hDispatchDriver
209
        Boolean retVal
210
        Get phDispatchDriver to hDispatchDriver
211
        Send PrepareParams to hDispatchDriver 1
212
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
213
        Get InvokeComMethod of hDispatchDriver 17 OLE_VT_BOOL to retVal
214
        Function_Return retVal
215
    End_Function
216
217
    // Returns the instruction address of the specified source file and line number
218
    Function ComGetCommandFromSourceLine String llfile UInteger llline Returns Integer
219
        Handle hDispatchDriver
220
        Integer retVal
221
        Get phDispatchDriver to hDispatchDriver
222
        Send PrepareParams to hDispatchDriver 2
223
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
224
        Send DefineParam to hDispatchDriver OLE_VT_UI4 llline
225
        Get InvokeComMethod of hDispatchDriver 18 OLE_VT_I4 to retVal
226
        Function_Return retVal
227
    End_Function
228
229
    // Requests the runtime to reallocate the specified buffer
230
    Function ComReallocProgramBuffer Char ByRef llpData Integer llsize Returns Char
231
        Handle hDispatchDriver
232
        Char retVal
233
        Get phDispatchDriver to hDispatchDriver
234
        Send PrepareParams to hDispatchDriver 2
235
        Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_I1) llpData
236
        Send DefineParam to hDispatchDriver OLE_VT_I4 llsize
237
        Get InvokeComMethod of hDispatchDriver 19 (OLE_VT_BYREF ior OLE_VT_I1) to retVal
238
        Function_Return retVal
239 16 wil
    End_Function
240 8 wil
241 10 wil
    // Introduced in vdf14.1
242 8 wil
    // Returns a list of attachable processes
243
    Function ComGetAttachableProcesses Returns UInteger[]
244
        Handle hDispatchDriver
245
        UInteger[] retVal
246
        Get phDispatchDriver to hDispatchDriver
247
        Get InvokeComMethod of hDispatchDriver 20 (OLE_VT_ARRAY ior OLE_VT_UI4) to retVal
248
        Function_Return retVal
249 2 wil
    End_Function
250 8 wil
251 10 wil
    // Introduced in vdf14.1
252 8 wil
    // Attaches and starts debugging the specified process
253
    Procedure ComAttachProcess UInteger llpid
254
        Handle hDispatchDriver
255
        Get phDispatchDriver to hDispatchDriver
256
        Send PrepareParams to hDispatchDriver 1
257
        Send DefineParam to hDispatchDriver OLE_VT_UI4 llpid
258
        Send InvokeComMethod to hDispatchDriver 21 OLE_VT_VOID
259
    End_Procedure
260
261 10 wil
    // Introduced in vdf15.0
262 8 wil
    // Sets the specified conditional breakpoint expression
263
    Function ComSetBreakPointCondition String llfile UInteger ByRef llline String llexpr Returns Boolean
264
        Handle hDispatchDriver
265
        Boolean retVal
266
        Get phDispatchDriver to hDispatchDriver
267
        Send PrepareParams to hDispatchDriver 3
268
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
269
        Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_UI4) llline
270
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llexpr
271
        Get InvokeComMethod of hDispatchDriver 22 OLE_VT_BOOL to retVal
272
        Function_Return retVal
273
    End_Function
274
275 10 wil
    // Introduced in vdf15.0
276 8 wil
    // Attempts to adjust the current instruction pointer to the specified file and line
277
    Function ComSetNextInstruction String llfile UInteger llline Returns Boolean
278
        Handle hDispatchDriver
279
        Boolean retVal
280
        Get phDispatchDriver to hDispatchDriver
281
        Send PrepareParams to hDispatchDriver 2
282
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llfile
283
        Send DefineParam to hDispatchDriver OLE_VT_UI4 llline
284
        Get InvokeComMethod of hDispatchDriver 23 OLE_VT_BOOL to retVal
285
        Function_Return retVal
286
    End_Function
287
288 2 wil
End_Class
289
290 16 wil
// CLSID:
291 2 wil
// _IDebuggerEngineEvents Interface
292
Class cCom_IDebuggerEngineEvents is a Mixin
293
294
    // Occurs after program has been successfully initialized
295
    { MethodType=Event }
296
    Procedure OnComProgramInit
297
    End_Procedure
298
299
    // Occurs after the program exits
300
    { MethodType=Event }
301
    Procedure OnComProgramExit
302
    End_Procedure
303
304
    // Occurs if there is an error starting the program
305
    { MethodType=Event }
306
    Procedure OnComProgramStartupError String llerrorMessage
307
    End_Procedure
308
309
    // Occurs if there is an error initializing the program
310
    { MethodType=Event }
311
    Procedure OnComProgramInitError String llerrorMessage
312
    End_Procedure
313
314
    // Occurs when the program execution is paused
315
    { MethodType=Event }
316
    Procedure OnComProgramPaused String llfile UInteger llline Boolean lllimitedBreakMode
317
    End_Procedure
318
319
    // Occurs when the program execution resumes
320
    { MethodType=Event }
321
    Procedure OnComProgramContinue
322
    End_Procedure
323
324
    // Occurs after a change requiring views to be refreshed
325
    { MethodType=Event }
326
    Procedure OnComUpdateView String llfile UInteger llline
327
    End_Procedure
328
329
    // Occurs when a new message is executed
330
    { MethodType=Event }
331
    Procedure OnComNewMessage Integer llbSteppin
332
    End_Procedure
333
334
    // Occurs if an unhandled program exception is detected
335
    { MethodType=Event }
336
    Procedure OnComUnhandledProgramException String lldescription
337
    End_Procedure
338
339
    // Occurs if there is an incoming request for another web app session. You can abandon the current session and switch to the new session or deny the new session and continue debugging the current session
340
    { MethodType=Event }
341
    Procedure OnComAcceptWebAppSession Boolean ByRef llacceptNewSession
342
    End_Procedure
343
344
    // Occurs if there is a fatal web app error
345
    { MethodType=Event }
346
    Procedure OnComWebAppError String lldescription
347
    End_Procedure
348
349
    // Occurs when a new webapp event log entry is added
350
    { MethodType=Event }
351
    Procedure OnComWebAppLog Integer lleventId String lltext
352
    End_Procedure
353
354 10 wil
    // Introduced in vdf15.0
355 8 wil
    // Occurs if there was an error evaluating a conditional breakpoint
356
    { MethodType=Event }
357
    Procedure OnComBreakPointError String lltext
358
    End_Procedure
359
360
361 2 wil
    { Visibility=Private }
362
    Procedure RegisterComEvents
363 8 wil
        Integer iRuntimeVersion
364
365
        Get piRuntimeVersion To iRuntimeVersion
366 2 wil
        Send RegisterComEvent 1 msg_OnComProgramInit
367
        Send RegisterComEvent 2 msg_OnComProgramExit
368
        Send RegisterComEvent 3 msg_OnComProgramStartupError
369
        Send RegisterComEvent 4 msg_OnComProgramInitError
370
        Send RegisterComEvent 5 msg_OnComProgramPaused
371
        Send RegisterComEvent 6 msg_OnComProgramContinue
372
        Send RegisterComEvent 7 msg_OnComUpdateView
373
        Send RegisterComEvent 8 msg_OnComNewMessage
374
        Send RegisterComEvent 9 msg_OnComUnhandledProgramException
375
        Send RegisterComEvent 10 msg_OnComAcceptWebAppSession
376
        Send RegisterComEvent 11 msg_OnComWebAppError
377
        Send RegisterComEvent 12 msg_OnComWebAppLog
378 10 wil
        If (iRuntimeVersion >= 150) Begin
379 8 wil
          Send RegisterComEvent 13 msg_OnComBreakPointError
380 16 wil
        End
381 2 wil
    End_Procedure
382
End_Class
383
384
// CoClass
385 8 wil
// ProgID: VDFDebugger.DebuggerEngine.xx.yy
386 16 wil
// CLSID:
387 2 wil
// DebuggerEngine Class
388
Class cComCDebuggerEngine is a cComAutomationObject
389
    Import_Class_Protocol cComIDebuggerEngine
390
    Import_Class_Protocol cCom_IDebuggerEngineEvents
391
392
    Procedure Construct_Object
393 8 wil
        Property Integer piRuntimeVersion      0
394
395
        Send Construct_Runtime_Object
396
397 16 wil
        Forward Send Construct_Object
398 8 wil
399 2 wil
        Set peAutoCreate to acNoAutoCreate
400
    End_Procedure
401 8 wil
402
    Procedure Construct_Runtime_Object
403
      Integer iRuntimeVersion
404
405
      Send DetermineRuntimeVersion
406
      Get piRuntimeVersion To iRuntimeVersion
407
      If (iRuntimeVersion>0) Begin
408
        Case Begin
409
          Case (iRuntimeVersion=121)
410 10 wil
            Set psProgID  to "{5D1787AA-8784-44C1-9DC9-23691B555BC5}"
411 8 wil
            Set psEventId to "{095A09B6-44D2-47A7-831D-FAC23B90E647}"
412
            Case Break
413 10 wil
          Case (iRuntimeVersion=140)
414
            Set psProgID  to "{C42F9C95-1C4D-4B82-AC23-E2987C133C89}"
415
            Set psEventId to "{BACC0261-865D-4461-A4D0-DD1DAAD76DCF}"
416
            Case Break
417
          Case (iRuntimeVersion=141)
418
            Set psProgID  to "{D4E8A085-6BCB-401E-8935-53B0BC3DE1F7}"
419
            Set psEventId to "{42057C20-ACDD-437A-B2F7-0A5022F1D907}"
420
            Case Break
421
          Case (iRuntimeVersion=150)
422
            Set psProgID  to "{B05C6BA2-22E1-4F33-9CC0-1FCF4238C150}"
423
            Set psEventId to "{BF31B3B2-D914-4E62-9D37-23723833FF8A}"
424
            Case Break
425
          Case (iRuntimeVersion=151)
426
            Set psProgID  to "{D0F02260-D707-4DD7-940E-C35EB389D16B}"
427
            Set psEventId to "{9590FEB3-ABD2-4763-AFDB-A218196A9C6F}"
428
            Case Break
429
          Case (iRuntimeVersion=160)
430
            Set psProgID  to "{B7ED76CF-D6F8-4528-8275-2F3F792E008B}"
431
            Set psEventId to "{0EBB5A76-0143-45A7-884E-0E252A11795E}"
432
            Case Break
433
          Case (iRuntimeVersion=161)
434
            Set psProgID  to "{5B894619-D007-4A25-9786-FE0CD2C414BA}"
435
            Set psEventId to "{264BB78F-E976-4BD6-A217-8D10D2AF718D}"
436
            Case Break
437
          Case (iRuntimeVersion=170)
438
            Set psProgID  to "{06CDD06C-BDCC-4EC7-AC76-6D05677E2B18}"
439
            Set psEventId to "{6B877F88-533E-451A-867F-DC19C4384288}"
440
            Case Break
441 8 wil
          Case (iRuntimeVersion=171)
442 10 wil
            Set psProgID  to "{EC61BA89-1E93-4218-84CD-BF60813C296D}"
443 8 wil
            Set psEventId to "{3E68B693-41EF-4DBB-AF45-0593F5396501}"
444 16 wil
            Case Break
445 14 wil
          Case (iRuntimeVersion=180)
446
            Set psProgID  to "{BA11DE00-6B72-40D4-AC0D-E5FFAAF0B8CC}"
447
            Set psEventId to "{216D2FA6-C7EF-4A89-87BA-8AB5E2D71000}"
448 16 wil
            Case Break
449
          Case (iRuntimeVersion=181)
450
            Set psProgID  to "{171F96C0-5821-4944-A9AD-A181370171B5}"
451
            Set psEventId to "{BB17ACB2-A5A0-49EE-AFDE-D47A13D0F8DA}"
452
            Case Break
453 52 wil
          Case (iRuntimeVersion=182)
454
            Set psProgID  to "{2F6ADD84-7CE0-46B3-B3DA-681CC5A95A83}"
455
            Set psEventId to "{56C51041-E9CB-4A2D-8FFF-31B0676B2292}"
456
            Case Break
457 55 wil
          Case (iRuntimeVersion=190)
458
            Set psProgID  to "{B947F0F4-13FF-499B-854E-BDE229EF6B0C}"
459
            Set psEventId to "{CD4D543E-6821-4F48-BB51-7180EA842021}"
460
            Case Break
461 58 wil
          Case (iRuntimeVersion=191)
462
            Set psProgID  to "{7A3BE09B-46E4-4D34-9450-491696976C76}"
463
            Set psEventId to "{67B9146F-8928-4CDD-9032-7CCEF01D7330}"
464
            Case Break
465 8 wil
          Case Else
466
            Send Stop_Box ("The debug component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
467
            Abort
468
        Case End
469
      End
470
      Else Begin
471
        Send Stop_Box "Could not determine runtime version of passed application." CS_SPLATFATALCAPTION
472
        Abort
473 16 wil
      End
474
    End_Procedure // Construct_Runtime_Object
475 8 wil
476
    Procedure DetermineRuntimeVersion
477 16 wil
    End_Procedure // DetermineRuntimeVersion
478 2 wil
End_Class
479
480 8 wil
// CLSID:
481 2 wil
// ICallStack Interface
482
Class cComICallStack is a Mixin
483
484
    // property MessageColumnWidth
485
    { MethodType=Property DesignTime=False }
486
    Function ComMessageColumnWidth Returns Integer
487
        Handle hDispatchDriver
488
        Integer retVal
489
        Get phDispatchDriver to hDispatchDriver
490
        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
491
        Function_Return retVal
492
    End_Function
493
494
    // property MessageColumnWidth
495
    { MethodType=Property DesignTime=False }
496
    Procedure Set ComMessageColumnWidth Integer value
497
        Handle hDispatchDriver
498
        Get phDispatchDriver to hDispatchDriver
499
        Send PrepareParams to hDispatchDriver 1
500
        Set ComProperty of hDispatchDriver 1 OLE_VT_I4 to value
501
    End_Procedure
502
503
    // property ObjectColumnWidth
504
    { MethodType=Property DesignTime=False }
505
    Function ComObjectColumnWidth Returns Integer
506
        Handle hDispatchDriver
507
        Integer retVal
508
        Get phDispatchDriver to hDispatchDriver
509
        Get InvokeComMethod of hDispatchDriver 2 OLE_VT_I4 to retVal
510
        Function_Return retVal
511
    End_Function
512
513
    // property ObjectColumnWidth
514
    { MethodType=Property DesignTime=False }
515
    Procedure Set ComObjectColumnWidth Integer value
516
        Handle hDispatchDriver
517
        Get phDispatchDriver to hDispatchDriver
518
        Send PrepareParams to hDispatchDriver 1
519
        Set ComProperty of hDispatchDriver 2 OLE_VT_I4 to value
520
    End_Procedure
521
End_Class
522
523 16 wil
// CLSID:
524 2 wil
// _ICallStackEvents Interface
525
Class cCom_ICallStackEvents is a Mixin
526
527
    { Visibility=Private }
528
    Procedure RegisterComEvents
529
    End_Procedure
530
End_Class
531
532
// CoClass
533 8 wil
// ProgID: VDFDebugger.CallStack.xx.yy
534 16 wil
// CLSID:
535
// CallStack Class
536 2 wil
Class cComCCallStack is a cComActiveXControl
537
    Import_Class_Protocol cComICallStack
538
    Import_Class_Protocol cCom_ICallStackEvents
539
540
    Procedure Construct_Object
541 8 wil
        Property Integer piRuntimeVersion      0
542
543
        Send Construct_Runtime_Object
544
545 2 wil
        Forward Send Construct_Object
546 8 wil
547 2 wil
        Set peAutoCreate to acDeferredAutoCreate
548
    End_Procedure
549 8 wil
550
    Procedure Construct_Runtime_Object
551
      Integer iRuntimeVersion
552
553
      Send DetermineRuntimeVersion
554
      Get piRuntimeVersion To iRuntimeVersion
555
      If (iRuntimeVersion>0) Begin
556
        Case Begin
557
          Case (iRuntimeVersion=121)
558 10 wil
            Set psProgID  to "{A03ABC66-F7B4-431D-97BC-50A14EDF6801}"
559 8 wil
            Set psEventId to "{69F6877B-5D55-4B53-B800-31F8D70A5865}"
560
            Case Break
561 10 wil
          Case (iRuntimeVersion=140)
562
            Set psProgID  to "{6DF90F7D-B29C-4753-9D5A-22E1F68D8AAB}"
563
            Set psEventId to "{A1BCC09D-F31D-4210-8061-B9F15300E981}"
564
            Case Break
565
          Case (iRuntimeVersion=141)
566
            Set psProgID  to "{23158C9C-11D0-4235-A17A-E45BDD3D7B5B}"
567
            Set psEventId to "{3D452939-8654-4D7E-A153-080155DD13BF}"
568
            Case Break
569
          Case (iRuntimeVersion=150)
570
            Set psProgID  to "{316ACE93-D566-4D98-A1DE-8C5B8D049C5F}"
571
            Set psEventId to "{B952BFAC-39CE-4FF5-B3A5-96E7964DBEAF}"
572
            Case Break
573
          Case (iRuntimeVersion=151)
574
            Set psProgID  to "{27A64009-1EA1-4D8A-9CDF-397E2623A789}"
575
            Set psEventId to "{711066C1-D52F-4182-8CD6-273501AE411A}"
576
            Case Break
577
          Case (iRuntimeVersion=160)
578
            Set psProgID  to "{A24F04F5-18D2-4D8D-B47C-53BCA01CDFC2}"
579
            Set psEventId to "{4B9989B2-3EC1-4388-95CD-D1C7129179B6}"
580
            Case Break
581
          Case (iRuntimeVersion=161)
582
            Set psProgID  to "{085F69A7-64C9-4AD8-85AF-3ACD5D7223AC}"
583
            Set psEventId to "{CD23CF24-8977-4501-B46E-CE3D2E351EFE}"
584
            Case Break
585
          Case (iRuntimeVersion=170)
586
            Set psProgID  to "{0FCE23F5-C38D-456F-9B7A-7DD0CCF0BAA3}"
587
            Set psEventId to "{55801305-66DE-4D00-B08D-144214A11217}"
588
            Case Break
589 16 wil
          Case (iRuntimeVersion=171)
590 10 wil
            Set psProgID  to "{84421400-9D1E-4BCF-8FE3-B7A2BB7DF429}"
591 8 wil
            Set psEventId to "{D0B6752E-0D47-43E4-A437-9C56C77B03DA}"
592 16 wil
            Case Break
593
          Case (iRuntimeVersion=180)
594 14 wil
            Set psProgID  to "{66B11369-FA28-4344-BAA2-F595500C2B4E}"
595
            Set psEventId to "{46832FCB-926C-4B33-A0F7-F3F109D432A0}"
596 16 wil
            Case Break
597
          Case (iRuntimeVersion=181)
598
            Set psProgID  to "{F29634D8-9A2A-4A9B-8DBA-C68949A25DAF}"
599
            Set psEventId to "{DC45918E-F658-4D97-BC84-77314530643B}"
600
            Case Break
601 52 wil
          Case (iRuntimeVersion=182)
602
            Set psProgID  to "{9C6ACD13-4F6F-4D36-8D04-8AC916983087}"
603
            Set psEventId to "{40A518EF-465F-47A3-86AF-F3D9E62BA493}"
604
            Case Break
605 55 wil
          Case (iRuntimeVersion=190)
606
            Set psProgID  to "{E2568C04-384E-47CF-BC94-0EFA5E2F982B}"
607
            Set psEventId to "{690FA63D-01B7-439E-89F7-69656C52656E}"
608
            Case Break
609 58 wil
          Case (iRuntimeVersion=191)
610
            Set psProgID  to "{003AA2E5-C76C-40F7-8741-3B705E57051F}"
611
            Set psEventId to "{AFBE68CB-74F4-4FDA-8EC0-A80075A095C2}"
612
            Case Break
613 8 wil
          Case Else
614
            Send Stop_Box ("The callstack component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
615
            Abort
616
        Case End
617
      End
618
      Else Begin
619
        Send Stop_Box "Could not determine runtime version of passed application for callstack." CS_SPLATFATALCAPTION
620
        Abort
621 16 wil
      End
622
    End_Procedure // Construct_Runtime_Object
623 8 wil
624
    Procedure DetermineRuntimeVersion
625 16 wil
    End_Procedure // DetermineRuntimeVersion
626 8 wil
627 2 wil
End_Class
628
629
// CLSID: {149B7FCC-117B-4407-AC2B-67338349D701}
630
// IMessageTrace Interface
631
Class cComIMessageTrace is a Mixin
632
633
    // property bTraceOn - controles if tracing is turned on or off
634
    { MethodType=Property DesignTime=False }
635
    Function ComBTraceOn Returns Integer
636
        Handle hDispatchDriver
637
        Integer retVal
638
        Get phDispatchDriver to hDispatchDriver
639
        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
640
        Function_Return retVal
641
    End_Function
642
643
    // property bTraceOn - controles if tracing is turned on or off
644
    { MethodType=Property DesignTime=False }
645
    Procedure Set ComBTraceOn Integer value
646
        Handle hDispatchDriver
647
        Get phDispatchDriver to hDispatchDriver
648
        Send PrepareParams to hDispatchDriver 1
649
        Set ComProperty of hDispatchDriver 1 OLE_VT_I4 to value
650
    End_Procedure
651
652
    // method LoadFilters - provide array of message names that are supposed to be filtered
653
    Procedure ComLoadFilters String[] llsaFilters
654
        Handle hDispatchDriver
655
        Get phDispatchDriver to hDispatchDriver
656
        Send PrepareParams to hDispatchDriver 1
657
        Send DefineParam to hDispatchDriver (OLE_VT_ARRAY ior OLE_VT_BSTR) llsaFilters
658
        Send InvokeComMethod to hDispatchDriver 2 OLE_VT_VOID
659
    End_Procedure
660
661
    // method ClearFilters - dont apply any filters
662
    Procedure ComClearFilters
663
        Handle hDispatchDriver
664
        Get phDispatchDriver to hDispatchDriver
665
        Send InvokeComMethod to hDispatchDriver 3 OLE_VT_VOID
666
    End_Procedure
667
668
    // property sLogFileName - name of the file where traced messages will be stored
669
    { MethodType=Property DesignTime=False }
670
    Function ComSLogFileName Returns String
671
        Handle hDispatchDriver
672
        String retVal
673
        Get phDispatchDriver to hDispatchDriver
674
        Get InvokeComMethod of hDispatchDriver 4 OLE_VT_BSTR to retVal
675
        Function_Return retVal
676
    End_Function
677
678
    // property sLogFileName - name of the file where traced messages will be stored
679
    { MethodType=Property DesignTime=False }
680
    Procedure Set ComSLogFileName String value
681
        Handle hDispatchDriver
682
        Get phDispatchDriver to hDispatchDriver
683
        Send PrepareParams to hDispatchDriver 1
684
        Set ComProperty of hDispatchDriver 4 OLE_VT_BSTR to value
685
    End_Procedure
686
687
    // method ClearTrace - clears tree. It works only when tracing is currently off
688
    Procedure ComClearTrace
689
        Handle hDispatchDriver
690
        Get phDispatchDriver to hDispatchDriver
691
        Send InvokeComMethod to hDispatchDriver 7 OLE_VT_VOID
692
    End_Procedure
693
694
    // method AddFilter - add one message to filter array
695
    Procedure ComAddFilter String llsFilter
696
        Handle hDispatchDriver
697
        Get phDispatchDriver to hDispatchDriver
698
        Send PrepareParams to hDispatchDriver 1
699
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llsFilter
700
        Send InvokeComMethod to hDispatchDriver 8 OLE_VT_VOID
701 16 wil
    End_Procedure
702 8 wil
703
704 10 wil
    // Introduced in vdf14.0
705 8 wil
    // method SaveTracer - Saves content of a tree. Parameter controles if children of unexpanded nodes should be processed too
706
    Procedure ComSaveTracer Integer llbAsIs
707
        Handle hDispatchDriver
708
        Get phDispatchDriver to hDispatchDriver
709
        Send PrepareParams to hDispatchDriver 1
710
        Send DefineParam to hDispatchDriver OLE_VT_I4 llbAsIs
711
        Send InvokeComMethod to hDispatchDriver 9 OLE_VT_VOID
712 2 wil
    End_Procedure
713 8 wil
714 2 wil
End_Class
715
716
// CLSID: {768B3472-A53F-4969-A250-4AB0756FDB5F}
717
// _IMessageTraceEvents Interface
718
Class cCom_IMessageTraceEvents is a Mixin
719
720
    // method OnMessageClicked - fired when user clicked node in a message trace tree
721
    { MethodType=Event }
722
    Procedure OnComMessageClicked UInteger llcommandNo
723
    End_Procedure
724
725
    // method OnAddMsg2Filter  - when user selected context menu for the add 2 filter message option
726
    { MethodType=Event }
727
    Procedure OnComAddMsg2Filter String llsMessageName
728
    End_Procedure
729
730
    // method OnFilterOptions - fired when user wants to bring dialog for defining message filters
731
    { MethodType=Event }
732
    Procedure OnComFilterOptions
733
    End_Procedure
734
735 10 wil
    // Introduced in vdf14.0
736 8 wil
    // method OnContextMenu - fired when user right clicked to bring up context menu
737
    { MethodType=Event }
738
    Procedure OnComContextMenu String llsMessageName UInteger llpoint
739
    End_Procedure
740
741
742 2 wil
    { Visibility=Private }
743
    Procedure RegisterComEvents
744 8 wil
        Integer iRuntimeVersion
745
746
        Get piRuntimeVersion To iRuntimeVersion
747 2 wil
        Send RegisterComEvent 1 msg_OnComMessageClicked
748
        Send RegisterComEvent 2 msg_OnComAddMsg2Filter
749
        Send RegisterComEvent 3 msg_OnComFilterOptions
750 10 wil
        If (iRuntimeVersion >= 140) Begin
751 8 wil
          Send RegisterComEvent 4 msg_OnComContextMenu
752 16 wil
        End
753 2 wil
    End_Procedure
754
End_Class
755
756
// CoClass
757
// ProgID: vdfdbg.MessageTrace.12.1
758
// CLSID: {BDC0465B-AA4A-460B-81FC-1D080CAF697B}
759 8 wil
// MessageTrace Class { CLSID="{BDC0465B-AA4A-460B-81FC-1D080CAF697B}" }
760 2 wil
Class cComCMessageTrace is a cComActiveXControl
761
    Import_Class_Protocol cComIMessageTrace
762
    Import_Class_Protocol cCom_IMessageTraceEvents
763
764
    Procedure Construct_Object
765 8 wil
        Property Integer piRuntimeVersion      0
766
767
        Send Construct_Runtime_Object
768
769 2 wil
        Forward Send Construct_Object
770 8 wil
771 2 wil
        Set peAutoCreate to acDeferredAutoCreate
772 16 wil
    End_Procedure
773 8 wil
774
775
    Procedure Construct_Runtime_Object
776
      Integer iRuntimeVersion
777
778
      Send DetermineRuntimeVersion
779
      Get piRuntimeVersion To iRuntimeVersion
780
      If (iRuntimeVersion>0) Begin
781
        Case Begin
782
          Case (iRuntimeVersion=121)
783 10 wil
            Set psProgID  to "{BDC0465B-AA4A-460B-81FC-1D080CAF697B}"
784 8 wil
            Set psEventId to "{768B3472-A53F-4969-A250-4AB0756FDB5F}"
785
            Case Break
786 10 wil
          Case (iRuntimeVersion=140)
787
            Set psProgID  to "{59CD8C8A-AF59-4F30-A4AC-7F70EACBDBD3}"
788
            Set psEventId to "{FC3691BE-70F8-4858-AD54-752B836B0864}"
789
            Case Break
790
          Case (iRuntimeVersion=141)
791
            Set psProgID  to "{F145CCCD-379A-42F1-B87B-3549E63A29BE}"
792
            Set psEventId to "{4E40C6A3-2221-4548-8CBE-95572863C91A}"
793
            Case Break
794
          Case (iRuntimeVersion=150)
795
            Set psProgID  to "{A485BFAE-42C9-4CEC-93BC-4C5B697588C0}"
796
            Set psEventId to "{DC4E3B27-ACB9-4C09-9F55-971235949335}"
797
            Case Break
798
          Case (iRuntimeVersion=151)
799
            Set psProgID  to "{990C4CA5-8F9E-4F8B-8CCB-036C1DF45B0E}"
800
            Set psEventId to "{A1E70110-2B34-4E2B-8499-CECB0A6C1034}"
801
            Case Break
802
          Case (iRuntimeVersion=160)
803
            Set psProgID  to "{70EEB655-0A2D-4817-B494-05090CC2EB38}"
804
            Set psEventId to "{F8207FD8-C7DD-4F04-B5FA-4EDF6F050045}"
805
            Case Break
806
          Case (iRuntimeVersion=161)
807
            Set psProgID  to "{B44EF827-949F-4B18-8AA9-09333D8C6795}"
808
            Set psEventId to "{83B6388A-4171-4DAF-84C7-AED86BAF1FDD}"
809
            Case Break
810
          Case (iRuntimeVersion=170)
811
            Set psProgID  to "{CA71995D-FBBD-4B2C-AB22-D4F930F38A73}"
812
            Set psEventId to "{13DAD475-F098-4998-9458-5D55409E2FF3}"
813
            Case Break
814 16 wil
          Case (iRuntimeVersion=171)
815 10 wil
            Set psProgID  to "{96D1BE93-C668-4ED2-A019-C8A8038BBC6F}"
816 8 wil
            Set psEventId to "{FEC2001F-C38C-4B82-B50A-27DF170E80F5}"
817 16 wil
            Case Break
818
          Case (iRuntimeVersion=180)
819 14 wil
            Set psProgID  to "{E1ECE87A-2D84-4992-810B-FE774EC06821}"
820
            Set psEventId to "{2FDB7CED-1C53-4777-915F-57AAE38D9448}"
821 16 wil
            Case Break
822
          Case (iRuntimeVersion=181)
823
            Set psProgID  to "{4EE6A8B2-B87A-45D5-864A-1DB75DC3E256}"
824
            Set psEventId to "{B7123F3C-6795-4B9B-9FEB-32E444B92841}"
825
            Case Break
826 52 wil
          Case (iRuntimeVersion=182)
827
            Set psProgID  to "{3D6DC1D2-F6D1-4720-9B04-562A4849FF4B}"
828
            Set psEventId to "{F356E55F-B70A-4C5D-BDAB-1FD06C22D58D}"
829
            Case Break
830 55 wil
          Case (iRuntimeVersion=190)
831
            Set psProgID  to "{2763EF43-1793-4737-B732-27D983821342}"
832
            Set psEventId to "{0E4DFEAB-36A9-4C67-BD0F-82D1D50ABA11}"
833
            Case Break
834 58 wil
          Case (iRuntimeVersion=191)
835
            Set psProgID  to "{DBAF5091-EF4D-487F-8A5B-E46C82B66E95}"
836
            Set psEventId to "{49D5E89A-AC2B-4F25-A775-80A8E7409BA0}"
837
            Case Break
838 8 wil
          Case Else
839
            Send Stop_Box ("The message trace component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
840
            Abort
841
        Case End
842
      End
843
      Else Begin
844
        Send Stop_Box "Could not determine runtime version of passed application for message trace." CS_SPLATFATALCAPTION
845
        Abort
846 16 wil
      End
847
    End_Procedure // Construct_Runtime_Object
848 8 wil
849
    Procedure DetermineRuntimeVersion
850 16 wil
    End_Procedure // DetermineRuntimeVersion
851 8 wil
852 2 wil
End_Class
853
854
// CLSID: {ED3CE9E1-32A8-4BE6-82E4-054939FD335A}
855
// ITablesWindow Interface
856
Class cComITablesWindow is a Mixin
857
858
    // property ColumnWidth
859
    { MethodType=Property DesignTime=False }
860
    Function ComColumnWidth Integer lllColumnIndex Returns Integer
861
        Handle hDispatchDriver
862
        Integer retVal
863
        Get phDispatchDriver to hDispatchDriver
864
        Send PrepareParams to hDispatchDriver 1
865
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
866
        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
867
        Function_Return retVal
868
    End_Function
869
870
    // property ColumnWidth
871
    { MethodType=Property DesignTime=False }
872
    Procedure Set ComColumnWidth Integer lllColumnIndex Integer value
873
        Handle hDispatchDriver
874
        Get phDispatchDriver to hDispatchDriver
875
        Send PrepareParams to hDispatchDriver 2
876
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
877
        Set ComProperty of hDispatchDriver 1 OLE_VT_I4 to value
878
    End_Procedure
879 16 wil
880
881
    // Introduced in DF18.1
882
    // method CopyDataValueToClipboard
883
    Procedure ComCopyDataValueToClipboard
884
        Handle hDispatchDriver
885
        Get phDispatchDriver to hDispatchDriver
886
        Send InvokeComMethod to hDispatchDriver 2 OLE_VT_VOID
887
    End_Procedure
888
889 2 wil
End_Class
890
891
// CLSID: {118331A8-61E6-4F82-B802-F19E42D63762}
892
// _ITablesWindowEvents Interface
893
Class cCom_ITablesWindowEvents is a Mixin
894
895
    // method OnCmdAddWatch - fired when user selects add to watch from popup menu
896
    { MethodType=Event }
897
    Procedure OnComCmdAddWatch String llsExpression
898
    End_Procedure
899
900 10 wil
    // Introduced in vdf14.0
901 8 wil
    // method OnContextMenu - fired when user right clicked to bring up context menu
902
    { MethodType=Event }
903
    Procedure OnComContextMenu String llsMessageName UInteger llpoint
904
    End_Procedure
905
906
907 2 wil
    { Visibility=Private }
908
    Procedure RegisterComEvents
909 8 wil
        Integer iRuntimeVersion
910
911
        Get piRuntimeVersion To iRuntimeVersion
912 2 wil
        Send RegisterComEvent 1 msg_OnComCmdAddWatch
913 10 wil
        If (iRuntimeVersion >= 140) Begin
914 8 wil
          Send RegisterComEvent 2 msg_OnComContextMenu
915 16 wil
        End
916 2 wil
    End_Procedure
917
End_Class
918
919
// CoClass
920 8 wil
// ProgID: vdfdbg.TablesWindow.cc.aa
921 16 wil
// CLSID:
922
// TablesWindow Class
923 2 wil
Class cComCTablesWindow is a cComActiveXControl
924
    Import_Class_Protocol cComITablesWindow
925
    Import_Class_Protocol cCom_ITablesWindowEvents
926
927
    Procedure Construct_Object
928 8 wil
        Property Integer piRuntimeVersion      0
929
930
        Send Construct_Runtime_Object
931
932 2 wil
        Forward Send Construct_Object
933 8 wil
934 2 wil
        Set peAutoCreate to acDeferredAutoCreate
935
    End_Procedure
936 8 wil
937
938
    Procedure Construct_Runtime_Object
939
      Integer iRuntimeVersion
940
941
      Send DetermineRuntimeVersion
942
      Get piRuntimeVersion To iRuntimeVersion
943
      If (iRuntimeVersion>0) Begin
944
        Case Begin
945
          Case (iRuntimeVersion=121)
946 10 wil
            Set psProgID  to "{35C803D2-2899-4F13-9456-5C7F5848FBCF}"
947 8 wil
            Set psEventId to "{118331A8-61E6-4F82-B802-F19E42D63762}"
948
            Case Break
949 10 wil
          Case (iRuntimeVersion=140)
950
            Set psProgID  to "{91CA7649-43B0-4F3E-92B3-BADD8A884447}"
951
            Set psEventId to "{F288F96A-8923-4E8F-B5CC-0AB160053C07}"
952
            Case Break
953
          Case (iRuntimeVersion=141)
954
            Set psProgID  to "{CA06A82B-74EA-40B8-A5A4-69E8A2CA3764}"
955
            Set psEventId to "{CAD0B222-D2C6-4F4C-A592-04DCC9D30D0D}"
956
            Case Break
957
          Case (iRuntimeVersion=150)
958
            Set psProgID  to "{07E109DA-BF00-41FF-9D21-96360E0608E4}"
959
            Set psEventId to "{58078986-055B-4901-AFF0-B55BEFA4B008}"
960
            Case Break
961
          Case (iRuntimeVersion=151)
962
            Set psProgID  to "{9450B22B-01C2-4AE2-95DC-A8AF3FD979A1}"
963
            Set psEventId to "{4DC20661-26A4-4AC2-9908-BB2A13E002D3}"
964
            Case Break
965
          Case (iRuntimeVersion=160)
966
            Set psProgID  to "{4CFBF226-218B-4AE9-8874-CBE5506D3EA5}"
967
            Set psEventId to "{7C238927-0A96-46B9-B9F9-A8824B9E93E3}"
968
            Case Break
969
          Case (iRuntimeVersion=161)
970
            Set psProgID  to "{77D5AA47-2305-42D2-A726-5973D4B394C6}"
971
            Set psEventId to "{17B95A0E-4AA1-4C8A-8E0E-9DE56B1C9E17}"
972
            Case Break
973
          Case (iRuntimeVersion=170)
974
            Set psProgID  to "{E41C20AC-C9F0-4BB0-8612-FBB0AC620781}"
975
            Set psEventId to "{F47F3B85-A94A-4510-950E-AD4B5F25C4B9}"
976
            Case Break
977 8 wil
          Case (iRuntimeVersion=171)
978 10 wil
            Set psProgID  to "{F92169DF-8131-4FF6-B247-FAD053B3460E}"
979 8 wil
            Set psEventId to "{9C300088-C7E3-40F0-BF54-65DDFC1A81B5}"
980 16 wil
            Case Break
981 14 wil
          Case (iRuntimeVersion=180)
982
            Set psProgID  to "{A2D34452-84FF-4F22-9215-3F9D9660EAD1}"
983
            Set psEventId to "{CD7F9D4A-09B6-4FD1-8B52-A331489257F4}"
984 16 wil
            Case Break
985
          Case (iRuntimeVersion=181)
986
            Set psProgID  to "{8DD5EC8B-C787-4B99-A2F7-F35C66A5422F}"
987
            Set psEventId to "{29E04458-C4CB-4B04-BBAE-38452B0039E2}"
988
            Case Break
989 52 wil
          Case (iRuntimeVersion=182)
990
            Set psProgID  to "{05AA305A-1698-47A5-8A61-0DFB349813BF}"
991
            Set psEventId to "{503A436C-8E9D-454D-8351-8A811CEE6A5C}"
992
            Case Break
993 55 wil
          Case (iRuntimeVersion=190)
994
            Set psProgID  to "{7B990C47-0CC6-4F4B-A6C4-1A4644E3804E}"
995
            Set psEventId to "{BCDD8AEC-97C6-4705-9FD3-40CD3274B4EE}"
996
            Case Break
997 58 wil
          Case (iRuntimeVersion=191)
998
            Set psProgID  to "{B2B3B951-FA39-4409-9D90-0F235DF692F8}"
999
            Set psEventId to "{597EDE36-FEE8-4021-B4E7-086957C44F0B}"
1000
            Case Break
1001 8 wil
          Case Else
1002
            Send Stop_Box ("The debug tables component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
1003
            Abort
1004
        Case End
1005
      End
1006
      Else Begin
1007
        Send Stop_Box "Could not determine runtime version of passed application for debug tables." CS_SPLATFATALCAPTION
1008
        Abort
1009 16 wil
      End
1010
    End_Procedure // Construct_Runtime_Object
1011 8 wil
1012
    Procedure DetermineRuntimeVersion
1013 16 wil
    End_Procedure // DetermineRuntimeVersion
1014 8 wil
1015 2 wil
End_Class
1016
1017
// CLSID: {340DCA34-E155-45F4-96A5-25A10E191919}
1018
// IVariablesWindow Interface
1019
Class cComIVariablesWindow is a Mixin
1020
1021
    // property WindowType (set 0 for local variables, and 1 for globals)
1022
    { MethodType=Property DesignTime=False }
1023
    Function ComWindowType Returns OLEdbgVariableWindows
1024
        Handle hDispatchDriver
1025
        OLEdbgVariableWindows retVal
1026
        Get phDispatchDriver to hDispatchDriver
1027
        Get InvokeComMethod of hDispatchDriver 1 OLE_VT_I4 to retVal
1028
        Function_Return retVal
1029
    End_Function
1030
1031
    // property WindowType (set 0 for local variables, and 1 for globals)
1032
    { MethodType=Property DesignTime=False }
1033
    Procedure Set ComWindowType OLEdbgVariableWindows value
1034
        Handle hDispatchDriver
1035
        Get phDispatchDriver to hDispatchDriver
1036
        Send PrepareParams to hDispatchDriver 1
1037
        Set ComProperty of hDispatchDriver 1 OLE_VT_I4 to value
1038
    End_Procedure
1039
1040
    // property ColumnWidth
1041
    { MethodType=Property DesignTime=False }
1042
    Function ComColumnWidth Integer lllColumnIndex Returns Integer
1043
        Handle hDispatchDriver
1044
        Integer retVal
1045
        Get phDispatchDriver to hDispatchDriver
1046
        Send PrepareParams to hDispatchDriver 1
1047
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
1048
        Get InvokeComMethod of hDispatchDriver 2 OLE_VT_I4 to retVal
1049
        Function_Return retVal
1050
    End_Function
1051
1052
    // property ColumnWidth
1053
    { MethodType=Property DesignTime=False }
1054
    Procedure Set ComColumnWidth Integer lllColumnIndex Integer value
1055
        Handle hDispatchDriver
1056
        Get phDispatchDriver to hDispatchDriver
1057
        Send PrepareParams to hDispatchDriver 2
1058
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
1059
        Set ComProperty of hDispatchDriver 2 OLE_VT_I4 to value
1060
    End_Procedure
1061 8 wil
1062
1063 10 wil
    // Introduced in vdf15.0
1064 8 wil
    // method ToggleSelectionViewAsObject
1065
    Procedure ComToggleSelectionViewAsObject
1066
        Handle hDispatchDriver
1067
        Get phDispatchDriver to hDispatchDriver
1068
        Send InvokeComMethod to hDispatchDriver 3 OLE_VT_VOID
1069
    End_Procedure
1070
1071 10 wil
    // Introduced in vdf15.0
1072 8 wil
    // method CanToggleSelectionViewAsObject
1073
    Function ComCanToggleSelectionViewAsObject Returns Boolean
1074
        Handle hDispatchDriver
1075
        Boolean retVal
1076
        Get phDispatchDriver to hDispatchDriver
1077
        Get InvokeComMethod of hDispatchDriver 4 OLE_VT_BOOL to retVal
1078
        Function_Return retVal
1079
    End_Function
1080
1081 10 wil
    // Introduced in vdf15.0
1082 8 wil
    // method IsSelectionViewAsObject
1083
    Function ComIsSelectionViewAsObject Returns Boolean
1084
        Handle hDispatchDriver
1085
        Boolean retVal
1086
        Get phDispatchDriver to hDispatchDriver
1087
        Get InvokeComMethod of hDispatchDriver 5 OLE_VT_BOOL to retVal
1088
        Function_Return retVal
1089
    End_Function
1090
1091 16 wil
    // Introduced in DF18.1
1092
    // method CopyDataValueToClipboard
1093
    Procedure ComCopyDataValueToClipboard
1094
        Handle hDispatchDriver
1095
        Get phDispatchDriver to hDispatchDriver
1096
        Send InvokeComMethod to hDispatchDriver 6 OLE_VT_VOID
1097
    End_Procedure
1098
1099
    // Introduced in DF18.1
1100
    // method CanCopyDataValue
1101
    Function ComCanCopyDataValue Returns Boolean
1102
        Handle hDispatchDriver
1103
        Boolean retVal
1104
        Get phDispatchDriver to hDispatchDriver
1105
        Get InvokeComMethod of hDispatchDriver 7 OLE_VT_BOOL to retVal
1106
        Function_Return retVal
1107
    End_Function
1108
1109 8 wil
1110 2 wil
End_Class
1111
1112
// CLSID: {E1CA1311-93EA-4A32-AD25-B623F09BA771}
1113
// _IVariablesWindowEvents Interface
1114
Class cCom_IVariablesWindowEvents is a Mixin
1115
1116
    // method OnCmdAddWatch - fired when user selects add to watch from popup menu
1117
    { MethodType=Event }
1118
    Procedure OnComCmdAddWatch String llsExpression
1119
    End_Procedure
1120
1121 10 wil
    // Introduced in vdf14.0
1122 8 wil
    // method OnContextMenu - fired when user right clicked to bring up context menu
1123
    { MethodType=Event }
1124
    Procedure OnComContextMenu String llsMessageName UInteger llpoint
1125
    End_Procedure
1126
1127 2 wil
    { Visibility=Private }
1128
    Procedure RegisterComEvents
1129 8 wil
        Integer iRuntimeVersion
1130
1131
        Get piRuntimeVersion To iRuntimeVersion
1132 2 wil
        Send RegisterComEvent 1 msg_OnComCmdAddWatch
1133 10 wil
        If (iRuntimeVersion >= 140) Begin
1134 8 wil
          Send RegisterComEvent 2 msg_OnComContextMenu
1135 16 wil
        End
1136 2 wil
    End_Procedure
1137
End_Class
1138
1139
// CoClass
1140 8 wil
// ProgID: vdfdbg.VariablesWindow.xx.yy
1141 16 wil
// CLSID:
1142 2 wil
// VariablesWindow Class
1143
Class cComCVariablesWindow is a cComActiveXControl
1144
    Import_Class_Protocol cComIVariablesWindow
1145
    Import_Class_Protocol cCom_IVariablesWindowEvents
1146
1147
    Procedure Construct_Object
1148 8 wil
        Property Integer piRuntimeVersion      0
1149
1150 16 wil
        Send Construct_Runtime_Object
1151 8 wil
1152 2 wil
        Forward Send Construct_Object
1153 8 wil
1154 2 wil
        Set peAutoCreate to acDeferredAutoCreate
1155
    End_Procedure
1156 8 wil
1157
1158
    Procedure Construct_Runtime_Object
1159
      Integer iRuntimeVersion
1160
1161
      Send DetermineRuntimeVersion
1162
      Get piRuntimeVersion To iRuntimeVersion
1163
      If (iRuntimeVersion>0) Begin
1164
        Case Begin
1165
          Case (iRuntimeVersion=121)
1166 10 wil
            Set psProgID  to "{3DCB562D-47E1-4630-B494-DAA84D173F51}"
1167 8 wil
            Set psEventId to "{E1CA1311-93EA-4A32-AD25-B623F09BA771}"
1168
            Case Break
1169 10 wil
          Case (iRuntimeVersion=140)
1170
            Set psProgID  to "{FC62D35A-D0A9-4BE2-9C7B-699892657275}"
1171
            Set psEventId to "{64752F65-F0EA-4E39-A934-A826B94483A5}"
1172
            Case Break
1173
          Case (iRuntimeVersion=141)
1174
            Set psProgID  to "{BEB2FE78-D0E8-4406-A92B-E410638288AD}"
1175
            Set psEventId to "{913F4BDD-10DE-4923-8945-030CA5B48649}"
1176
            Case Break
1177
          Case (iRuntimeVersion=150)
1178
            Set psProgID  to "{7099EAFD-4230-4C37-B547-D9E03EE8BDF6}"
1179
            Set psEventId to "{A61BC600-3025-4E33-A263-A34AA2C68249}"
1180
            Case Break
1181
          Case (iRuntimeVersion=151)
1182
            Set psProgID  to "{4E23F1D7-28AE-4F8C-8ADE-BFA168603003}"
1183
            Set psEventId to "{9BA3385E-3382-45DE-9879-855F01A0E0C9}"
1184
            Case Break
1185
          Case (iRuntimeVersion=160)
1186
            Set psProgID  to "{3B742EEF-8870-47F7-A817-D5C4CFFC8471}"
1187
            Set psEventId to "{EB553338-E564-4F1B-B2DA-67A4BA97720B}"
1188
            Case Break
1189
          Case (iRuntimeVersion=161)
1190
            Set psProgID  to "{6C7A06AA-4148-4558-A298-20B0FFB9FD42}"
1191
            Set psEventId to "{521D95D0-2FE8-4014-9995-C43A019EE325}"
1192
            Case Break
1193
          Case (iRuntimeVersion=170)
1194
            Set psProgID  to "{398EA7A3-D404-4372-8CE4-0CEE44AE5255}"
1195
            Set psEventId to "{5A43E915-F93D-48FE-9CD1-37BEF6514865}"
1196
            Case Break
1197 8 wil
          Case (iRuntimeVersion=171)
1198 10 wil
            Set psProgID  to "{4816B313-5B85-4F96-AAD8-2F8EB26D6CE9}"
1199 8 wil
            Set psEventId to "{CD510572-332A-4145-A1BF-8A77F18C107C}"
1200 16 wil
            Case Break
1201 14 wil
          Case (iRuntimeVersion=180)
1202
            Set psProgID  to "{800A71A1-412D-4082-B1C9-856E32C4FE01}"
1203
            Set psEventId to "{7B1BDF69-C17A-483D-8787-9F05972561C5}"
1204 16 wil
            Case Break
1205
          Case (iRuntimeVersion=181)
1206
            Set psProgID  to "{4F68B1B0-80E0-40D4-A429-7576B48D32FC}"
1207
            Set psEventId to "{BCD531B3-8927-49E0-A386-1096D12BC170}"
1208
            Case Break
1209 52 wil
          Case (iRuntimeVersion=182)
1210
            Set psProgID  to "{69E32690-0291-48EF-856C-51896F8E146F}"
1211
            Set psEventId to "{2EDDE32A-4CD1-4BE9-A875-99DDAB2A1009}"
1212
            Case Break
1213 55 wil
          Case (iRuntimeVersion=190)
1214
            Set psProgID  to "{CF2149B0-36B1-4BFB-BB3D-7A5889F793FE}"
1215
            Set psEventId to "{73DFB990-71DC-4727-A113-06BA73F4DE7E}"
1216
            Case Break
1217 58 wil
          Case (iRuntimeVersion=191)
1218
            Set psProgID to "{6245C464-0C89-4B88-8523-FDA685519CD2}"
1219
            Set psEventId to "{92FB2A2D-6F67-4CB2-855A-7E4AB60A3269}"
1220
            Case Break
1221 8 wil
          Case Else
1222
            Send Stop_Box ("The debug variables component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
1223
            Abort
1224
        Case End
1225
      End
1226
      Else Begin
1227
        Send Stop_Box "Could not determine runtime version of passed application for debug variables." CS_SPLATFATALCAPTION
1228
        Abort
1229 16 wil
      End
1230
    End_Procedure // Construct_Runtime_Object
1231 8 wil
1232
    Procedure DetermineRuntimeVersion
1233 16 wil
    End_Procedure // DetermineRuntimeVersion
1234 8 wil
1235 2 wil
End_Class
1236
1237
// CLSID: {5FF4AD31-3606-4009-80BA-9C7A9E959538}
1238
// IWatches Interface
1239
Class cComIWatches is a Mixin
1240
1241
    // method LoadWatches - Loads expressions in the grid
1242
    Procedure ComLoadWatches String[] llsaExpressions
1243
        Handle hDispatchDriver
1244
        Get phDispatchDriver to hDispatchDriver
1245
        Send PrepareParams to hDispatchDriver 1
1246
        Send DefineParam to hDispatchDriver (OLE_VT_ARRAY ior OLE_VT_BSTR) llsaExpressions
1247
        Send InvokeComMethod to hDispatchDriver 1 OLE_VT_VOID
1248
    End_Procedure
1249
1250
    // method GetWatches - Get Array of expressions currently displayed
1251
    Function ComGetWatches Returns String[]
1252
        Handle hDispatchDriver
1253
        String[] retVal
1254
        Get phDispatchDriver to hDispatchDriver
1255
        Get InvokeComMethod of hDispatchDriver 2 (OLE_VT_ARRAY ior OLE_VT_BSTR) to retVal
1256
        Function_Return retVal
1257
    End_Function
1258
1259
    // method ClearWatches - Remove all watches from window
1260
    Procedure ComClearWatches
1261
        Handle hDispatchDriver
1262
        Get phDispatchDriver to hDispatchDriver
1263
        Send InvokeComMethod to hDispatchDriver 3 OLE_VT_VOID
1264
    End_Procedure
1265
1266
    // method AddWatch
1267
    Procedure ComAddWatch String llsWatch
1268
        Handle hDispatchDriver
1269
        Get phDispatchDriver to hDispatchDriver
1270
        Send PrepareParams to hDispatchDriver 1
1271
        Send DefineParam to hDispatchDriver OLE_VT_BSTR llsWatch
1272
        Send InvokeComMethod to hDispatchDriver 4 OLE_VT_VOID
1273
    End_Procedure
1274
1275
    // property ColumnWidth
1276
    { MethodType=Property DesignTime=False }
1277
    Function ComColumnWidth Integer lllColumnIndex Returns Integer
1278
        Handle hDispatchDriver
1279
        Integer retVal
1280
        Get phDispatchDriver to hDispatchDriver
1281
        Send PrepareParams to hDispatchDriver 1
1282
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
1283
        Get InvokeComMethod of hDispatchDriver 5 OLE_VT_I4 to retVal
1284
        Function_Return retVal
1285
    End_Function
1286
1287
    // property ColumnWidth
1288
    { MethodType=Property DesignTime=False }
1289
    Procedure Set ComColumnWidth Integer lllColumnIndex Integer value
1290
        Handle hDispatchDriver
1291
        Get phDispatchDriver to hDispatchDriver
1292
        Send PrepareParams to hDispatchDriver 2
1293
        Send DefineParam to hDispatchDriver OLE_VT_I4 lllColumnIndex
1294
        Set ComProperty of hDispatchDriver 5 OLE_VT_I4 to value
1295
    End_Procedure
1296 8 wil
1297
1298 10 wil
    // Introduced in vdf15.0
1299 8 wil
    // method ToggleSelectionViewAsObject
1300
    Procedure ComToggleSelectionViewAsObject
1301
        Handle hDispatchDriver
1302
        Get phDispatchDriver to hDispatchDriver
1303
        Send InvokeComMethod to hDispatchDriver 6 OLE_VT_VOID
1304
    End_Procedure
1305
1306 10 wil
    // Introduced in vdf15.0
1307 8 wil
    // method CanToggleSelectionViewAsObject
1308
    Function ComCanToggleSelectionViewAsObject Returns Boolean
1309
        Handle hDispatchDriver
1310
        Boolean retVal
1311
        Get phDispatchDriver to hDispatchDriver
1312
        Get InvokeComMethod of hDispatchDriver 7 OLE_VT_BOOL to retVal
1313
        Function_Return retVal
1314
    End_Function
1315
1316 10 wil
    // Introduced in vdf15.0
1317 8 wil
    // method IsSelectionViewAsObject
1318
    Function ComIsSelectionViewAsObject Returns Boolean
1319
        Handle hDispatchDriver
1320
        Boolean retVal
1321
        Get phDispatchDriver to hDispatchDriver
1322
        Get InvokeComMethod of hDispatchDriver 8 OLE_VT_BOOL to retVal
1323
        Function_Return retVal
1324
    End_Function
1325
1326 16 wil
    // Introduced in DF18.1
1327
    // method CopyDataValueToClipboard
1328
    Procedure ComCopyDataValueToClipboard
1329
        Handle hDispatchDriver
1330
        Get phDispatchDriver to hDispatchDriver
1331
        Send InvokeComMethod to hDispatchDriver 9 OLE_VT_VOID
1332
    End_Procedure
1333
1334
    // Introduced in DF18.1
1335
    // method CanCopyDataValue
1336
    Function ComCanCopyDataValue Returns Boolean
1337
        Handle hDispatchDriver
1338
        Boolean retVal
1339
        Get phDispatchDriver to hDispatchDriver
1340
        Get InvokeComMethod of hDispatchDriver 10 OLE_VT_BOOL to retVal
1341
        Function_Return retVal
1342
    End_Function
1343 8 wil
1344 2 wil
End_Class
1345 8 wil
1346 2 wil
1347 10 wil
// Introduced in vdf14.0
1348 16 wil
// CLSID:
1349 8 wil
// _IWatchesEvents Interface
1350
Class cCom_IWatchesEvents is a Mixin
1351
1352
    // method OnContextMenu - fired when user right clicked to bring up context menu
1353
    { MethodType=Event }
1354
    Procedure OnComContextMenu UInteger llpoint
1355
    End_Procedure
1356
1357
    { Visibility=Private }
1358
    Procedure RegisterComEvents
1359
        Integer iRuntimeVersion
1360
1361
        Get piRuntimeVersion To iRuntimeVersion
1362 10 wil
        If (iRuntimeVersion>140) Begin
1363 8 wil
          Send RegisterComEvent 1 msg_OnComContextMenu
1364
        End
1365
    End_Procedure
1366
End_Class
1367
1368
1369
1370 2 wil
// CoClass
1371 8 wil
// ProgID: vdfdbg.Watches.xx.yy
1372 16 wil
// CLSID:
1373 2 wil
// Watches Class
1374
Class cComCWatches is a cComActiveXControl
1375
    Import_Class_Protocol cComIWatches
1376 8 wil
    Import_Class_Protocol cCom_IWatchesEvents
1377
1378 2 wil
1379
    Procedure Construct_Object
1380 8 wil
        Property Integer piRuntimeVersion      0
1381
1382 16 wil
        Send Construct_Runtime_Object
1383 8 wil
1384 2 wil
        Forward Send Construct_Object
1385 8 wil
1386 2 wil
        Set peAutoCreate to acDeferredAutoCreate
1387
    End_Procedure
1388 8 wil
1389
1390
    Procedure Construct_Runtime_Object
1391
      Integer iRuntimeVersion
1392
1393
      Send DetermineRuntimeVersion
1394
      Get piRuntimeVersion To iRuntimeVersion
1395
      If (iRuntimeVersion>0) Begin
1396
        Case Begin
1397
          Case (iRuntimeVersion=121)
1398 10 wil
            Set psProgID  to "{DAAF28FD-83C9-43C0-9EFF-B31718B8F969}"
1399 8 wil
            Case Break
1400 10 wil
          Case (iRuntimeVersion=140)
1401
            Set psProgID  to "{705C8088-C38D-42B8-97B0-0B884CC18258}"
1402
            Set psEventId to "{0FB06DC9-1F4F-4407-9357-A2F8F06089C1}"
1403 16 wil
            Case Break
1404 10 wil
          Case (iRuntimeVersion=141)
1405
            Set psProgID  to "{21326EB8-BCE8-4E4D-AC46-5C0C4AA18DC9}"
1406
            Set psEventId to "{937D4E5E-010E-4ADF-B9D5-7300ACFE0778}"
1407
            Case Break
1408
          Case (iRuntimeVersion=150)
1409
            Set psProgID  to "{8C287ADF-6CB4-4821-8C32-2CA94B7D97D0}"
1410
            Set psEventId to "{0BD0A0F8-34CF-404A-8D16-C7CEE9A0C76C}"
1411
            Case Break
1412
          Case (iRuntimeVersion=151)
1413
            Set psProgID  to "{D74F2668-22A8-4382-A225-04E4A42179A7}"
1414
            Set psEventId to "{1D49C1B8-AF08-4002-871D-9FCDC27413C9}"
1415
            Case Break
1416
          Case (iRuntimeVersion=160)
1417
            Set psProgID  to "{F281D305-1446-49FE-8739-130495F45AE8}"
1418
            Set psEventId to "{007FECE4-446E-4215-B05D-F566EA6994D0}"
1419
            Case Break
1420
          Case (iRuntimeVersion=161)
1421
            Set psProgID  to "{D01A01B0-1A06-4CDE-9BEF-CD11C5754AAF}"
1422
            Set psEventId to "{7D00FCBF-0577-4E70-B51C-380B9AEAF5C0}"
1423
            Case Break
1424
          Case (iRuntimeVersion=170)
1425
            Set psProgID  to "{EC46FECC-1D70-4DC7-8DA0-96DEF69F0FE3}"
1426
            Set psEventId to "{27179A78-7816-4DCD-9936-4AF0F9710A79}"
1427
            Case Break
1428 8 wil
          Case (iRuntimeVersion=171)
1429 10 wil
            Set psProgID  to "{7E95BA97-4CEA-4FCC-A78F-C53A2FE3BD41}"
1430 8 wil
            Set psEventId to "{BD2C9BF6-FE93-4F49-92A1-011CA97A7515}"
1431 16 wil
            Case Break
1432 14 wil
          Case (iRuntimeVersion=180)
1433
            Set psProgID  to "{EB60D95E-BFF7-40B4-9D3B-2817F69279DA}"
1434
            Set psEventId to "{BE25D8E7-F995-474F-B5F2-09288BB2EC32}"
1435 16 wil
            Case Break
1436
          Case (iRuntimeVersion=181)
1437
            Set psProgID  to "{9AA2081A-1F94-4AEC-9F96-9CAA7087075F}"
1438
            Set psEventId to "{F09A8A1A-2272-45C7-BFB8-BFE057CAED48}"
1439
            Case Break
1440 52 wil
          Case (iRuntimeVersion=182)
1441
            Set psProgID  to "{2A91AF25-76B1-4150-8EDF-7387AB6B6CC1}"
1442
            Set psEventId to "{09413F3F-2C0A-4323-854E-288EBA8D2FEC}"
1443
            Case Break
1444 58 wil
          Case (iRuntimeVersion=191)
1445
            Set psProgID to "{13BB6CF5-A873-4363-B189-A2A6CA844C73}"
1446
            Set psEventId to "{13DBFB1B-3755-4563-8C40-B7DCBAC23024}"
1447 55 wil
            Case Break
1448 8 wil
          Case Else
1449
            Send Stop_Box ("The debug watches component for VDF"*trim(iRuntimeVersion)*"has not yet been defined.") CS_SPLATFATALCAPTION
1450
            Abort
1451
        Case End
1452
      End
1453
      Else Begin
1454
        Send Stop_Box "Could not determine runtime version of passed application for debug watches." CS_SPLATFATALCAPTION
1455
        Abort
1456 16 wil
      End
1457
    End_Procedure // Construct_Runtime_Object
1458 8 wil
1459
    Procedure DetermineRuntimeVersion
1460 16 wil
    End_Procedure // DetermineRuntimeVersion
1461 8 wil
1462 2 wil
End_Class