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 | // RemoteMDInternalRWSource.h |
6 | // |
7 | |
8 | // |
9 | //***************************************************************************** |
10 | |
11 | #ifndef _REMOTE_MDINTERNALRW_SOURCE_ |
12 | #define _REMOTE_MDINTERNALRW_SOURCE_ |
13 | |
14 | #include "targettypes.h" |
15 | |
16 | class RemoteMDInternalRWSource : IMDCustomDataSource |
17 | { |
18 | public: |
19 | RemoteMDInternalRWSource(); |
20 | virtual ~RemoteMDInternalRWSource(); |
21 | |
22 | //***************************************************************************** |
23 | // IUnknown methods |
24 | //***************************************************************************** |
25 | STDMETHODIMP QueryInterface(REFIID riid, void** ppv); |
26 | STDMETHODIMP_(ULONG) AddRef(void); |
27 | STDMETHODIMP_(ULONG) Release(void); |
28 | |
29 | //***************************************************************************** |
30 | // IMDCustomDataSource methods |
31 | //***************************************************************************** |
32 | STDMETHODIMP GetSchema(CMiniMdSchema* pSchema); |
33 | STDMETHODIMP GetTableDef(ULONG32 tableIndex, CMiniTableDef* pTableDef); |
34 | STDMETHODIMP GetBlobHeap(MetaData::DataBlob* pBlobHeapData); |
35 | STDMETHODIMP GetGuidHeap(MetaData::DataBlob* pGuidHeapData); |
36 | STDMETHODIMP GetStringHeap(MetaData::DataBlob* pStringHeapData); |
37 | STDMETHODIMP GetUserStringHeap(MetaData::DataBlob* pUserStringHeapData); |
38 | STDMETHODIMP GetTableRecords(ULONG32 tableIndex, MetaData::DataBlob* pTableRecordData); |
39 | STDMETHODIMP GetTableSortable(ULONG32 tableIndex, BOOL* pSortable); |
40 | STDMETHODIMP GetStorageSignature(MetaData::DataBlob* pStorageSignature); |
41 | |
42 | //***************************************************************************** |
43 | // public non-COM methods |
44 | //***************************************************************************** |
45 | HRESULT InitFromTarget(TADDR remoteMDInternalRWAddress, ICorDebugDataTarget* pDataTarget, DWORD defines, DWORD dataStructureVersion); |
46 | |
47 | private: |
48 | Target_MDInternalRW m_targetData; |
49 | CMiniMdSchema m_Schema; |
50 | CMiniTableDef m_TableDefs[TBL_COUNT]; |
51 | MetaData::DataBlob m_StringHeap; |
52 | MetaData::DataBlob m_UserStringHeap; |
53 | MetaData::DataBlob m_BlobHeap; |
54 | MetaData::DataBlob m_GuidHeap; |
55 | MetaData::DataBlob m_TableRecords[TBL_COUNT]; |
56 | BOOL m_bSortable[TBL_COUNT]; |
57 | MetaData::DataBlob m_Sig; |
58 | |
59 | NewArrayHolder<BYTE> m_StringHeapStorage; |
60 | NewArrayHolder<BYTE> m_UserStringHeapStorage; |
61 | NewArrayHolder<BYTE> m_BlobHeapStorage; |
62 | NewArrayHolder<BYTE> m_GuidHeapStorage; |
63 | NewArrayHolder<BYTE> m_TableRecordsStorage[TBL_COUNT]; |
64 | NewArrayHolder<BYTE> m_SigStorage; |
65 | |
66 | volatile LONG m_cRef; |
67 | }; |
68 | |
69 | |
70 | #endif |
71 |