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 | |
11 | typedef VOID (*PSTARTUP_CALLBACK)(IUnknown *pCordb, PVOID parameter, HRESULT hr); |
12 | |
13 | EXTERN_C HRESULT |
14 | CreateProcessForLaunch( |
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 | |
22 | EXTERN_C HRESULT |
23 | ResumeProcess( |
24 | __in HANDLE hResumeHandle); |
25 | |
26 | EXTERN_C HRESULT |
27 | CloseResumeHandle( |
28 | __in HANDLE hResumeHandle); |
29 | |
30 | EXTERN_C HRESULT |
31 | RegisterForRuntimeStartup( |
32 | __in DWORD dwProcessId, |
33 | __in PSTARTUP_CALLBACK pfnCallback, |
34 | __in PVOID parameter, |
35 | __out PVOID *ppUnregisterToken); |
36 | |
37 | EXTERN_C HRESULT |
38 | RegisterForRuntimeStartupEx( |
39 | __in DWORD dwProcessId, |
40 | __in LPCWSTR szApplicationGroupId, |
41 | __in PSTARTUP_CALLBACK pfnCallback, |
42 | __in PVOID parameter, |
43 | __out PVOID *ppUnregisterToken); |
44 | |
45 | EXTERN_C HRESULT |
46 | UnregisterForRuntimeStartup( |
47 | __in PVOID pUnregisterToken); |
48 | |
49 | EXTERN_C HRESULT |
50 | GetStartupNotificationEvent( |
51 | __in DWORD debuggeePID, |
52 | __out HANDLE* phStartupEvent); |
53 | |
54 | EXTERN_C HRESULT |
55 | EnumerateCLRs(DWORD debuggeePID, |
56 | __out HANDLE** ppHandleArrayOut, |
57 | __out LPWSTR** ppStringArrayOut, |
58 | __out DWORD* pdwArrayLengthOut); |
59 | |
60 | EXTERN_C HRESULT |
61 | CloseCLREnumeration( |
62 | __in HANDLE* pHandleArray, |
63 | __in LPWSTR* pStringArray, |
64 | __in DWORD dwArrayLength); |
65 | |
66 | EXTERN_C HRESULT |
67 | CreateVersionStringFromModule( |
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 | |
74 | EXTERN_C HRESULT |
75 | CreateDebuggingInterfaceFromVersionEx( |
76 | __in int iDebuggerVersion, |
77 | __in LPCWSTR szDebuggeeVersion, |
78 | __out IUnknown ** ppCordb); |
79 | |
80 | EXTERN_C HRESULT |
81 | CreateDebuggingInterfaceFromVersion2( |
82 | __in int iDebuggerVersion, |
83 | __in LPCWSTR szDebuggeeVersion, |
84 | __in LPCWSTR szApplicationGroupId, |
85 | __out IUnknown ** ppCordb); |
86 | |
87 | EXTERN_C HRESULT |
88 | CreateDebuggingInterfaceFromVersion( |
89 | __in LPCWSTR szDebuggeeVersion, |
90 | __out IUnknown ** ppCordb); |
91 | |