| 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 | // ==++== |
| 6 | // |
| 7 | |
| 8 | // |
| 9 | // ==--== |
| 10 | #ifndef __data_h__ |
| 11 | #define __data_h__ |
| 12 | |
| 13 | #include "cor.h" |
| 14 | #include "corhdr.h" |
| 15 | #include "cor.h" |
| 16 | #include "dacprivate.h" |
| 17 | |
| 18 | BOOL FileExist (const char *filename); |
| 19 | BOOL FileExist (const WCHAR *filename); |
| 20 | |
| 21 | // We use global variables |
| 22 | // because move returns void if it fails |
| 23 | //typedef DWORD DWORD_PTR; |
| 24 | //typedef ULONG ULONG_PTR; |
| 25 | |
| 26 | // Max length in WCHAR for a buffer to store metadata name |
| 27 | const int mdNameLen = 2048; |
| 28 | extern WCHAR g_mdName[mdNameLen]; |
| 29 | |
| 30 | const int nMDIMPORT = 128; |
| 31 | struct MDIMPORT |
| 32 | { |
| 33 | enum MDType {InMemory, InFile, Dynamic}; |
| 34 | WCHAR *name; |
| 35 | size_t base; // base of the PE module |
| 36 | size_t mdBase; // base of the metadata |
| 37 | char *metaData; |
| 38 | ULONG metaDataSize; |
| 39 | MDType type; |
| 40 | IMetaDataImport *pImport; |
| 41 | |
| 42 | MDIMPORT *left; |
| 43 | MDIMPORT *right; |
| 44 | }; |
| 45 | |
| 46 | class Module; |
| 47 | |
| 48 | extern "C" BOOL ControlC; |
| 49 | extern IMetaDataDispenserEx *pDisp; |
| 50 | |
| 51 | #endif // __data_h__ |
| 52 | |