summaryrefslogtreecommitdiff
path: root/src/inc/corimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/corimage.h')
-rw-r--r--src/inc/corimage.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/inc/corimage.h b/src/inc/corimage.h
new file mode 100644
index 0000000000..19b148dfc0
--- /dev/null
+++ b/src/inc/corimage.h
@@ -0,0 +1,68 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+
+//
+
+/*============================================================
+**
+** CorImage.h
+**
+** IMAGEHLP routines so we can avoid early binding to that DLL.
+**
+===========================================================*/
+
+#ifndef _CORIMAGE_H_
+#define _CORIMAGE_H_
+
+#include <daccess.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+IMAGE_NT_HEADERS *Cor_RtlImageNtHeader(VOID *pvBase,
+ ULONG FileLength);
+
+PIMAGE_SECTION_HEADER
+Cor_RtlImageRvaToSection(PTR_IMAGE_NT_HEADERS NtHeaders,
+ ULONG Rva,
+ ULONG FileLength);
+
+PIMAGE_SECTION_HEADER
+Cor_RtlImageRvaRangeToSection(PTR_IMAGE_NT_HEADERS NtHeaders,
+ ULONG Rva,
+ ULONG Range,
+ ULONG FileLength);
+
+DWORD Cor_RtlImageRvaToOffset(PTR_IMAGE_NT_HEADERS NtHeaders,
+ ULONG Rva,
+ ULONG FileLength);
+
+PBYTE Cor_RtlImageRvaToVa(PTR_IMAGE_NT_HEADERS NtHeaders,
+ PBYTE Base,
+ ULONG Rva,
+ ULONG FileLength);
+
+PBYTE Cor_RtlImageDirToVa(PTR_IMAGE_NT_HEADERS NtHeaders,
+ PBYTE Base,
+ UINT DirIndex,
+ ULONG FileLength);
+
+PBYTE Cor_RtlImageRvaToVa32(PTR_IMAGE_NT_HEADERS32 NtHeaders,
+ PBYTE Base,
+ ULONG Rva,
+ ULONG FileLength);
+
+PBYTE Cor_RtlImageRvaToVa64(PTR_IMAGE_NT_HEADERS64 NtHeaders,
+ PBYTE Base,
+ ULONG Rva,
+ ULONG FileLength);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _CORIMAGE_H_