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#pragma once
6
7struct CallsiteDetails
8{
9 // The signature of the current call
10 MetaSig MetaSig;
11
12 // The current call frame
13 FramedMethodFrame *Frame;
14
15 // The relevant method for the callsite
16 MethodDesc *MethodDesc;
17
18 // Is the callsite for a delegate
19 // Note the relevant method may _not_ be a delegate
20 BOOL IsDelegate;
21
22 // Flags for callsite
23 enum
24 {
25 None = 0x0,
26 BeginInvoke = 0x01,
27 EndInvoke = 0x02,
28 Ctor = 0x04,
29 };
30 INT32 Flags;
31};
32
33namespace CallsiteInspect
34{
35 // Get all arguments and associated argument details at the supplied callsite
36 void GetCallsiteArgs(
37 _In_ CallsiteDetails &callsite,
38 _Outptr_ PTRARRAYREF *args,
39 _Outptr_ BOOLARRAYREF *argsIsByRef,
40 _Outptr_ PTRARRAYREF *argsTypes);
41
42 // Properly propagate out parameters
43 void PropagateOutParametersBackToCallsite(
44 _In_ PTRARRAYREF outParams,
45 _In_ OBJECTREF retVal,
46 _In_ CallsiteDetails &callsite);
47}
48