1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4//*****************************************************************************
5// DbgShim.h
6//
7//*****************************************************************************
8
9#include <windows.h>
10
11typedef VOID (*PSTARTUP_CALLBACK)(IUnknown *pCordb, PVOID parameter, HRESULT hr);
12
13EXTERN_C HRESULT
14CreateProcessForLaunch(
15 __in LPWSTR lpCommandLine,
16 __in BOOL bSuspendProcess,
17 __in LPVOID lpEnvironment,
18 __in LPCWSTR lpCurrentDirectory,
19 __out PDWORD pProcessId,
20 __out HANDLE *pResumeHandle);
21
22EXTERN_C HRESULT
23ResumeProcess(
24 __in HANDLE hResumeHandle);
25
26EXTERN_C HRESULT
27CloseResumeHandle(
28 __in HANDLE hResumeHandle);
29
30EXTERN_C HRESULT
31RegisterForRuntimeStartup(
32 __in DWORD dwProcessId,
33 __in PSTARTUP_CALLBACK pfnCallback,
34 __in PVOID parameter,
35 __out PVOID *ppUnregisterToken);
36
37EXTERN_C HRESULT
38RegisterForRuntimeStartupEx(
39 __in DWORD dwProcessId,
40 __in LPCWSTR szApplicationGroupId,
41 __in PSTARTUP_CALLBACK pfnCallback,
42 __in PVOID parameter,
43 __out PVOID *ppUnregisterToken);
44
45EXTERN_C HRESULT
46UnregisterForRuntimeStartup(
47 __in PVOID pUnregisterToken);
48
49EXTERN_C HRESULT
50GetStartupNotificationEvent(
51 __in DWORD debuggeePID,
52 __out HANDLE* phStartupEvent);
53
54EXTERN_C HRESULT
55EnumerateCLRs(DWORD debuggeePID,
56 __out HANDLE** ppHandleArrayOut,
57 __out LPWSTR** ppStringArrayOut,
58 __out DWORD* pdwArrayLengthOut);
59
60EXTERN_C HRESULT
61CloseCLREnumeration(
62 __in HANDLE* pHandleArray,
63 __in LPWSTR* pStringArray,
64 __in DWORD dwArrayLength);
65
66EXTERN_C HRESULT
67CreateVersionStringFromModule(
68 __in DWORD pidDebuggee,
69 __in LPCWSTR szModuleName,
70 __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
71 __in DWORD cchBuffer,
72 __out DWORD* pdwLength);
73
74EXTERN_C HRESULT
75CreateDebuggingInterfaceFromVersionEx(
76 __in int iDebuggerVersion,
77 __in LPCWSTR szDebuggeeVersion,
78 __out IUnknown ** ppCordb);
79
80EXTERN_C HRESULT
81CreateDebuggingInterfaceFromVersion2(
82 __in int iDebuggerVersion,
83 __in LPCWSTR szDebuggeeVersion,
84 __in LPCWSTR szApplicationGroupId,
85 __out IUnknown ** ppCordb);
86
87EXTERN_C HRESULT
88CreateDebuggingInterfaceFromVersion(
89 __in LPCWSTR szDebuggeeVersion,
90 __out IUnknown ** ppCordb);
91