summaryrefslogtreecommitdiff
path: root/src/dlls/dbgshim/dbgshim.h
blob: e3e7186da91735b82157354dda42cfc77fca8435 (plain)
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//*****************************************************************************
// DbgShim.h
// 
//*****************************************************************************

#include <windows.h>

typedef VOID (*PSTARTUP_CALLBACK)(IUnknown *pCordb, PVOID parameter, HRESULT hr);

EXTERN_C HRESULT
CreateProcessForLaunch(
    __in LPWSTR lpCommandLine,
    __in BOOL bSuspendProcess,
    __in LPVOID lpEnvironment,
    __in LPCWSTR lpCurrentDirectory,
    __out PDWORD pProcessId,
    __out HANDLE *pResumeHandle);

EXTERN_C HRESULT
ResumeProcess(
    __in HANDLE hResumeHandle);

EXTERN_C HRESULT
CloseResumeHandle(
    __in HANDLE hResumeHandle);

EXTERN_C HRESULT
RegisterForRuntimeStartup(
    __in DWORD dwProcessId,
    __in PSTARTUP_CALLBACK pfnCallback,
    __in PVOID parameter,
    __out PVOID *ppUnregisterToken);

EXTERN_C HRESULT
RegisterForRuntimeStartupEx(
    __in DWORD dwProcessId,
    __in LPCWSTR szApplicationGroupId,
    __in PSTARTUP_CALLBACK pfnCallback,
    __in PVOID parameter,
    __out PVOID *ppUnregisterToken);

EXTERN_C HRESULT
UnregisterForRuntimeStartup(
    __in PVOID pUnregisterToken);

EXTERN_C HRESULT
GetStartupNotificationEvent(
    __in DWORD debuggeePID,
    __out HANDLE* phStartupEvent);

EXTERN_C HRESULT
EnumerateCLRs(DWORD debuggeePID, 
    __out HANDLE** ppHandleArrayOut,
    __out LPWSTR** ppStringArrayOut,
    __out DWORD* pdwArrayLengthOut);

EXTERN_C HRESULT
CloseCLREnumeration(
    __in HANDLE* pHandleArray,
    __in LPWSTR* pStringArray,
    __in DWORD dwArrayLength);

EXTERN_C HRESULT
CreateVersionStringFromModule(
    __in DWORD pidDebuggee,
    __in LPCWSTR szModuleName,
    __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
    __in DWORD cchBuffer,
    __out DWORD* pdwLength);

EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersionEx(
    __in int iDebuggerVersion,
    __in LPCWSTR szDebuggeeVersion,
    __out IUnknown ** ppCordb);

EXTERN_C
DLLEXPORT
HRESULT
CreateDebuggingInterfaceFromVersion2(
    __in int iDebuggerVersion,
    __in LPCWSTR szDebuggeeVersion,
    __in LPCWSTR szApplicationGroupId,
    __out IUnknown ** ppCordb);

EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersion(
    __in LPCWSTR szDebuggeeVersion, 
    __out IUnknown ** ppCordb);