blob: ae3f4abe2ecbeef8056b6a76ce2fd714bd55b891 (
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
|
// 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.
//
//
/*============================================================
**
** Header: IJupiterObject.h
**
**
** Purpose: Defines headers used in RCW walk
**
==============================================================*/
#ifndef _H_JUPITER_OBJECT_
#define _H_JUPITER_OBJECT_
#ifdef FEATURE_COMINTEROP
#include "internalunknownimpl.h"
class ICCW;
// Windows.UI.Xaml.Hosting.IReferenceTrackerHost
class DECLSPEC_UUID("29a71c6a-3c42-4416-a39d-e2825a07a773") ICLRServices : public IUnknown
{
public :
STDMETHOD(GarbageCollect)(DWORD dwFlags) = 0;
STDMETHOD(FinalizerThreadWait)() = 0;
STDMETHOD(DisconnectRCWsInCurrentApartment)() = 0;
STDMETHOD(CreateManagedReference)(IUnknown *pJupiterObject, ICCW **ppNewReference) = 0;
STDMETHOD(AddMemoryPressure)(UINT64 bytesAllocated) = 0;
STDMETHOD(RemoveMemoryPressure)(UINT64 bytesAllocated) = 0;
};
// Windows.UI.Xaml.Hosting.IReferenceTrackerManager
class DECLSPEC_UUID("3cf184b4-7ccb-4dda-8455-7e6ce99a3298") IJupiterGCManager : public IUnknown
{
public :
STDMETHOD(OnGCStarted)() = 0;
STDMETHOD(OnRCWWalkFinished)(BOOL bWalkFailed) = 0;
STDMETHOD(OnGCFinished)() = 0;
STDMETHOD(SetCLRServices)(/* [in] */ ICLRServices *pCLRServices) = 0;
};
// Windows.UI.Xaml.Hosting.IReferenceTrackerTarget
class DECLSPEC_UUID("64bd43f8-bfee-4ec4-b7eb-2935158dae21") ICCW : public IUnknown
{
public :
STDMETHOD_(ULONG, AddReferenceFromJupiter)() = 0;
STDMETHOD_(ULONG, ReleaseFromJupiter)() = 0;
STDMETHOD(Peg)() = 0;
STDMETHOD(Unpeg)() = 0;
};
// Windows.UI.Xaml.Hosting.IFindReferenceTargetsCallback
class DECLSPEC_UUID("04b3486c-4687-4229-8d14-505ab584dd88") IFindDependentWrappersCallback : public IUnknown
{
public :
STDMETHOD(OnFoundDependentWrapper)(/* [in] */ ICCW *pCCW) = 0;
};
// Windows.UI.Xaml.Hosting.IReferenceTracker
class DECLSPEC_UUID("11d3b13a-180e-4789-a8be-7712882893e6") IJupiterObject : public IUnknown
{
public :
STDMETHOD(Connect)() = 0; // Notify Jupiter that we've created a new RCW
STDMETHOD(Disconnect)() = 0; // Notify Jupiter that we are about to destroy this RCW
STDMETHOD(FindDependentWrappers)(/* [in] */ IFindDependentWrappersCallback *pCallback) = 0;
// Find list of dependent CCWs for this RCW
STDMETHOD(GetJupiterGCManager)(/* [out, retval] */ IJupiterGCManager **ppJupiterGCManager) = 0;
// Retrieve IJupiterGCManager interface
STDMETHOD(AfterAddRef)() = 0; // Notify Jupiter that we've done a AddRef()
STDMETHOD(BeforeRelease)() = 0; // Notify Jupiter that we are about to do a Release()
STDMETHOD(Peg)() = 0; // Notify Jupiter that we've returned this IJupiterObject as
// [out] parameter and this IJupiterObject object including
// all its reachable CCWs should be pegged
};
extern const IID IID_ICCW;
extern const IID IID_IJupiterObject;
extern const IID IID_IJupiterGCManager;
extern const IID IID_IFindDependentWrappersCallback;
#endif // FEATURE_COMINTEROP
#endif // _H_JUPITER_OBJECT_
|