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** CorImage.h
11**
12** IMAGEHLP routines so we can avoid early binding to that DLL.
13**
14===========================================================*/
15
16#ifndef _CORIMAGE_H_
17#define _CORIMAGE_H_
18
19#include <daccess.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25IMAGE_NT_HEADERS *Cor_RtlImageNtHeader(VOID *pvBase,
26 ULONG FileLength);
27
28PIMAGE_SECTION_HEADER
29Cor_RtlImageRvaToSection(PTR_IMAGE_NT_HEADERS NtHeaders,
30 ULONG Rva,
31 ULONG FileLength);
32
33PIMAGE_SECTION_HEADER
34Cor_RtlImageRvaRangeToSection(PTR_IMAGE_NT_HEADERS NtHeaders,
35 ULONG Rva,
36 ULONG Range,
37 ULONG FileLength);
38
39DWORD Cor_RtlImageRvaToOffset(PTR_IMAGE_NT_HEADERS NtHeaders,
40 ULONG Rva,
41 ULONG FileLength);
42
43PBYTE Cor_RtlImageRvaToVa(PTR_IMAGE_NT_HEADERS NtHeaders,
44 PBYTE Base,
45 ULONG Rva,
46 ULONG FileLength);
47
48PBYTE Cor_RtlImageDirToVa(PTR_IMAGE_NT_HEADERS NtHeaders,
49 PBYTE Base,
50 UINT DirIndex,
51 ULONG FileLength);
52
53PBYTE Cor_RtlImageRvaToVa32(PTR_IMAGE_NT_HEADERS32 NtHeaders,
54 PBYTE Base,
55 ULONG Rva,
56 ULONG FileLength);
57
58PBYTE Cor_RtlImageRvaToVa64(PTR_IMAGE_NT_HEADERS64 NtHeaders,
59 PBYTE Base,
60 ULONG Rva,
61 ULONG FileLength);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif // _CORIMAGE_H_
68