-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathIDebugClient5.cs
More file actions
525 lines (418 loc) · 13.9 KB
/
Copy pathIDebugClient5.cs
File metadata and controls
525 lines (418 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable 1591
namespace Microsoft.Diagnostics.Runtime.Interop
{
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("e3acb9d7-7ec2-4f0c-a0da-e81e0cbbe628")]
public interface IDebugClient5 : IDebugClient4
{
/* IDebugClient */
[PreserveSig]
new int AttachKernel(
[In] DEBUG_ATTACH Flags,
[In, MarshalAs(UnmanagedType.LPStr)] string ConnectOptions);
[PreserveSig]
new int GetKernelConnectionOptions(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint OptionsSize);
[PreserveSig]
new int SetKernelConnectionOptions(
[In, MarshalAs(UnmanagedType.LPStr)] string Options);
[PreserveSig]
new int StartProcessServer(
[In] DEBUG_CLASS Flags,
[In, MarshalAs(UnmanagedType.LPStr)] string Options,
[In] IntPtr Reserved);
[PreserveSig]
new int ConnectProcessServer(
[In, MarshalAs(UnmanagedType.LPStr)] string RemoteOptions,
[Out] out ulong Server);
[PreserveSig]
new int DisconnectProcessServer(
[In] ulong Server);
[PreserveSig]
new int GetRunningProcessSystemIds(
[In] ulong Server,
[Out, MarshalAs(UnmanagedType.LPArray)] uint[] Ids,
[In] uint Count,
[Out] out uint ActualCount);
[PreserveSig]
new int GetRunningProcessSystemIdByExecutableName(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPStr)] string ExeName,
[In] DEBUG_GET_PROC Flags,
[Out] out uint Id);
[PreserveSig]
new int GetRunningProcessDescription(
[In] ulong Server,
[In] uint SystemId,
[In] DEBUG_PROC_DESC Flags,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder ExeName,
[In] int ExeNameSize,
[Out] out uint ActualExeNameSize,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Description,
[In] int DescriptionSize,
[Out] out uint ActualDescriptionSize);
[PreserveSig]
new int AttachProcess(
[In] ulong Server,
[In] uint ProcessID,
[In] DEBUG_ATTACH AttachFlags);
[PreserveSig]
new int CreateProcess(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS Flags);
[PreserveSig]
new int CreateProcessAndAttach(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS Flags,
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);
[PreserveSig]
new int GetProcessOptions(
[Out] out DEBUG_PROCESS Options);
[PreserveSig]
new int AddProcessOptions(
[In] DEBUG_PROCESS Options);
[PreserveSig]
new int RemoveProcessOptions(
[In] DEBUG_PROCESS Options);
[PreserveSig]
new int SetProcessOptions(
[In] DEBUG_PROCESS Options);
[PreserveSig]
new int OpenDumpFile(
[In, MarshalAs(UnmanagedType.LPStr)] string DumpFile);
[PreserveSig]
new int WriteDumpFile(
[In, MarshalAs(UnmanagedType.LPStr)] string DumpFile,
[In] DEBUG_DUMP Qualifier);
[PreserveSig]
new int ConnectSession(
[In] DEBUG_CONNECT_SESSION Flags,
[In] uint HistoryLimit);
[PreserveSig]
new int StartServer(
[In, MarshalAs(UnmanagedType.LPStr)] string Options);
[PreserveSig]
new int OutputServer(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPStr)] string Machine,
[In] DEBUG_SERVERS Flags);
[PreserveSig]
new int TerminateProcesses();
[PreserveSig]
new int DetachProcesses();
[PreserveSig]
new int EndSession(
[In] DEBUG_END Flags);
[PreserveSig]
new int GetExitCode(
[Out] out uint Code);
[PreserveSig]
new int DispatchCallbacks(
[In] uint Timeout);
[PreserveSig]
new int ExitDispatch(
[In, MarshalAs(UnmanagedType.Interface)] IDebugClient Client);
[PreserveSig]
new int CreateClient(
[Out, MarshalAs(UnmanagedType.Interface)] out IDebugClient Client);
[PreserveSig]
new int GetInputCallbacks(
[Out, MarshalAs(UnmanagedType.Interface)] out IDebugInputCallbacks Callbacks);
[PreserveSig]
new int SetInputCallbacks(
[In, MarshalAs(UnmanagedType.Interface)] IDebugInputCallbacks Callbacks);
/* GetOutputCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */
[PreserveSig]
new int GetOutputCallbacks(
[Out] out IDebugOutputCallbacks Callbacks);
/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */
[PreserveSig]
new int SetOutputCallbacks(
[In] IDebugOutputCallbacks Callbacks);
[PreserveSig]
new int GetOutputMask(
[Out] out DEBUG_OUTPUT Mask);
[PreserveSig]
new int SetOutputMask(
[In] DEBUG_OUTPUT Mask);
[PreserveSig]
new int GetOtherOutputMask(
[In, MarshalAs(UnmanagedType.Interface)] IDebugClient Client,
[Out] out DEBUG_OUTPUT Mask);
[PreserveSig]
new int SetOtherOutputMask(
[In, MarshalAs(UnmanagedType.Interface)] IDebugClient Client,
[In] DEBUG_OUTPUT Mask);
[PreserveSig]
new int GetOutputWidth(
[Out] out uint Columns);
[PreserveSig]
new int SetOutputWidth(
[In] uint Columns);
[PreserveSig]
new int GetOutputLinePrefix(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint PrefixSize);
[PreserveSig]
new int SetOutputLinePrefix(
[In, MarshalAs(UnmanagedType.LPStr)] string Prefix);
[PreserveSig]
new int GetIdentity(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint IdentitySize);
[PreserveSig]
new int OutputIdentity(
[In] DEBUG_OUTCTL OutputControl,
[In] uint Flags,
[In, MarshalAs(UnmanagedType.LPStr)] string Format);
/* GetEventCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */
[PreserveSig]
new int GetEventCallbacks(
[Out] out IDebugEventCallbacks Callbacks);
/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */
[PreserveSig]
new int SetEventCallbacks(
[In] IDebugEventCallbacks Callbacks);
[PreserveSig]
new int FlushCallbacks();
/* IDebugClient2 */
[PreserveSig]
new int WriteDumpFile2(
[In, MarshalAs(UnmanagedType.LPStr)] string DumpFile,
[In] DEBUG_DUMP Qualifier,
[In] DEBUG_FORMAT FormatFlags,
[In, MarshalAs(UnmanagedType.LPStr)] string Comment);
[PreserveSig]
new int AddDumpInformationFile(
[In, MarshalAs(UnmanagedType.LPStr)] string InfoFile,
[In] DEBUG_DUMP_FILE Type);
[PreserveSig]
new int EndProcessServer(
[In] ulong Server);
[PreserveSig]
new int WaitForProcessServerEnd(
[In] uint Timeout);
[PreserveSig]
new int IsKernelDebuggerEnabled();
[PreserveSig]
new int TerminateCurrentProcess();
[PreserveSig]
new int DetachCurrentProcess();
[PreserveSig]
new int AbandonCurrentProcess();
/* IDebugClient3 */
[PreserveSig]
new int GetRunningProcessSystemIdByExecutableNameWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string ExeName,
[In] DEBUG_GET_PROC Flags,
[Out] out uint Id);
[PreserveSig]
new int GetRunningProcessDescriptionWide(
[In] ulong Server,
[In] uint SystemId,
[In] DEBUG_PROC_DESC Flags,
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder ExeName,
[In] int ExeNameSize,
[Out] out uint ActualExeNameSize,
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Description,
[In] int DescriptionSize,
[Out] out uint ActualDescriptionSize);
[PreserveSig]
new int CreateProcessWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS CreateFlags);
[PreserveSig]
new int CreateProcessAndAttachWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS CreateFlags,
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);
/* IDebugClient4 */
[PreserveSig]
new int OpenDumpFileWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string FileName,
[In] ulong FileHandle);
[PreserveSig]
new int WriteDumpFileWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string DumpFile,
[In] ulong FileHandle,
[In] DEBUG_DUMP Qualifier,
[In] DEBUG_FORMAT FormatFlags,
[In, MarshalAs(UnmanagedType.LPWStr)] string Comment);
[PreserveSig]
new int AddDumpInformationFileWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string FileName,
[In] ulong FileHandle,
[In] DEBUG_DUMP_FILE Type);
[PreserveSig]
new int GetNumberDumpFiles(
[Out] out uint Number);
[PreserveSig]
new int GetDumpFile(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint NameSize,
[Out] out ulong Handle,
[Out] out uint Type);
[PreserveSig]
new int GetDumpFileWide(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint NameSize,
[Out] out ulong Handle,
[Out] out uint Type);
/* IDebugClient5 */
[PreserveSig]
int AttachKernelWide(
[In] DEBUG_ATTACH Flags,
[In, MarshalAs(UnmanagedType.LPWStr)] string ConnectOptions);
[PreserveSig]
int GetKernelConnectionOptionsWide(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint OptionsSize);
[PreserveSig]
int SetKernelConnectionOptionsWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string Options);
[PreserveSig]
int StartProcessServerWide(
[In] DEBUG_CLASS Flags,
[In, MarshalAs(UnmanagedType.LPWStr)] string Options,
[In] IntPtr Reserved);
[PreserveSig]
int ConnectProcessServerWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string RemoteOptions,
[Out] out ulong Server);
[PreserveSig]
int StartServerWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string Options);
[PreserveSig]
int OutputServersWide(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPWStr)] string Machine,
[In] DEBUG_SERVERS Flags);
/* GetOutputCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */
[PreserveSig]
int GetOutputCallbacksWide(
[Out] out IDebugOutputCallbacksWide Callbacks);
/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */
[PreserveSig]
int SetOutputCallbacksWide(
[In] IDebugOutputCallbacksWide Callbacks);
[PreserveSig]
int GetOutputLinePrefixWide(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint PrefixSize);
[PreserveSig]
int SetOutputLinePrefixWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string Prefix);
[PreserveSig]
int GetIdentityWide(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint IdentitySize);
[PreserveSig]
int OutputIdentityWide(
[In] DEBUG_OUTCTL OutputControl,
[In] uint Flags,
[In, MarshalAs(UnmanagedType.LPWStr)] string Machine);
/* GetEventCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */
[PreserveSig]
int GetEventCallbacksWide(
[Out] out IDebugEventCallbacksWide Callbacks);
/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */
[PreserveSig]
int SetEventCallbacksWide(
[In] IDebugEventCallbacksWide Callbacks);
[PreserveSig]
int CreateProcess2(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPStr)] string CommandLine,
[In] ref DEBUG_CREATE_PROCESS_OPTIONS OptionsBuffer,
[In] uint OptionsBufferSize,
[In, MarshalAs(UnmanagedType.LPStr)] string InitialDirectory,
[In, MarshalAs(UnmanagedType.LPStr)] string Environment);
[PreserveSig]
int CreateProcess2Wide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] ref DEBUG_CREATE_PROCESS_OPTIONS OptionsBuffer,
[In] uint OptionsBufferSize,
[In, MarshalAs(UnmanagedType.LPWStr)] string InitialDirectory,
[In, MarshalAs(UnmanagedType.LPWStr)] string Environment);
[PreserveSig]
int CreateProcessAndAttach2(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPStr)] string CommandLine,
[In] ref DEBUG_CREATE_PROCESS_OPTIONS OptionsBuffer,
[In] uint OptionsBufferSize,
[In, MarshalAs(UnmanagedType.LPStr)] string InitialDirectory,
[In, MarshalAs(UnmanagedType.LPStr)] string Environment,
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);
[PreserveSig]
int CreateProcessAndAttach2Wide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] ref DEBUG_CREATE_PROCESS_OPTIONS OptionsBuffer,
[In] uint OptionsBufferSize,
[In, MarshalAs(UnmanagedType.LPWStr)] string InitialDirectory,
[In, MarshalAs(UnmanagedType.LPWStr)] string Environment,
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);
[PreserveSig]
int PushOutputLinePrefix(
[In, MarshalAs(UnmanagedType.LPStr)] string NewPrefix,
[Out] out ulong Handle);
[PreserveSig]
int PushOutputLinePrefixWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string NewPrefix,
[Out] out ulong Handle);
[PreserveSig]
int PopOutputLinePrefix(
[In] ulong Handle);
[PreserveSig]
int GetNumberInputCallbacks(
[Out] out uint Count);
[PreserveSig]
int GetNumberOutputCallbacks(
[Out] out uint Count);
[PreserveSig]
int GetNumberEventCallbacks(
[In] DEBUG_EVENT Flags,
[Out] out uint Count);
[PreserveSig]
int GetQuitLockString(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint StringSize);
[PreserveSig]
int SetQuitLockString(
[In, MarshalAs(UnmanagedType.LPStr)] string LockString);
[PreserveSig]
int GetQuitLockStringWide(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint StringSize);
[PreserveSig]
int SetQuitLockStringWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string LockString);
}
}