-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathIDebugClient3.cs
More file actions
311 lines (245 loc) · 7.86 KB
/
Copy pathIDebugClient3.cs
File metadata and controls
311 lines (245 loc) · 7.86 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
// 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("dd492d7f-71b8-4ad6-a8dc-1c887479ff91")]
public interface IDebugClient3 : IDebugClient2
{
/* 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]
int GetRunningProcessSystemIdByExecutableNameWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string ExeName,
[In] DEBUG_GET_PROC Flags,
[Out] out uint Id);
[PreserveSig]
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]
int CreateProcessWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS CreateFlags);
[PreserveSig]
int CreateProcessAndAttachWide(
[In] ulong Server,
[In, MarshalAs(UnmanagedType.LPWStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS CreateFlags,
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);
}
}