summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/Strike/data.h
blob: 9989038653e6dd8e9f83964e56cc8fab214bea47 (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
// 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.

// ==++==
// 
 
// 
// ==--==
#ifndef __data_h__
#define __data_h__

#include "cor.h"
#include "corhdr.h"
#include "cor.h"
#include "dacprivate.h"

BOOL FileExist (const char *filename);
BOOL FileExist (const WCHAR *filename);

// We use global variables
// because move returns void if it fails
//typedef DWORD DWORD_PTR;
//typedef ULONG ULONG_PTR;

// Max length in WCHAR for a buffer to store metadata name
const int mdNameLen = 2048;
extern WCHAR g_mdName[mdNameLen];

const int nMDIMPORT = 128;
struct MDIMPORT
{
    enum MDType {InMemory, InFile, Dynamic};
    WCHAR *name;
    size_t base;    // base of the PE module
    size_t mdBase;  // base of the metadata
    char *metaData;
    ULONG metaDataSize;
    MDType type;
    IMetaDataImport *pImport;

    MDIMPORT *left;
    MDIMPORT *right;
};

class Module;

extern "C" BOOL ControlC;
extern IMetaDataDispenserEx *pDisp;

#endif // __data_h__