forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcallsiteinspect.h
47 lines (39 loc) · 1.2 KB
/
callsiteinspect.h
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#pragma once
struct CallsiteDetails
{
// The signature of the current call
class MetaSig MetaSig;
// The current call frame
FramedMethodFrame *Frame;
// The relevant method for the callsite
class MethodDesc *MethodDesc;
// Is the callsite for a delegate
// Note the relevant method may _not_ be a delegate
BOOL IsDelegate;
// Flags for callsite
enum
{
None = 0x0,
BeginInvoke = 0x01,
EndInvoke = 0x02,
Ctor = 0x04,
HResultReturn = 0x08,
};
INT32 Flags;
};
namespace CallsiteInspect
{
// Get all arguments and associated argument details at the supplied callsite
void GetCallsiteArgs(
_In_ CallsiteDetails &callsite,
_Outptr_ PTRARRAYREF *args,
_Outptr_ BOOLARRAYREF *argsIsByRef,
_Outptr_ PTRARRAYREF *argsTypes);
// Properly propagate out parameters
void PropagateOutParametersBackToCallsite(
_In_ PTRARRAYREF outParams,
_In_ OBJECTREF retVal,
_In_ CallsiteDetails &callsite);
}