IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IMAGE_FILE_HEADER.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2009 Jeroen Frijters
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19
20 Jeroen Frijters
21 jeroen@frijters.net
22
23*/
24using System.IO;
25
26using DWORD = System.UInt32;
27using WORD = System.UInt16;
28
30{
31
32 sealed class IMAGE_FILE_HEADER
33 {
34
35 public const WORD IMAGE_FILE_MACHINE_I386 = 0x014c;
36 public const WORD IMAGE_FILE_MACHINE_IA64 = 0x0200;
37 public const WORD IMAGE_FILE_MACHINE_AMD64 = 0x8664;
38
39 public const WORD IMAGE_FILE_32BIT_MACHINE = 0x0100;
40 public const WORD IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002;
41 public const WORD IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020;
42 public const WORD IMAGE_FILE_DLL = 0x2000;
43
44 public WORD Machine;
51
52 internal void Read(BinaryReader br)
53 {
54 Machine = br.ReadUInt16();
55 NumberOfSections = br.ReadUInt16();
56 TimeDateStamp = br.ReadUInt32();
57 PointerToSymbolTable = br.ReadUInt32();
58 NumberOfSymbols = br.ReadUInt32();
59 SizeOfOptionalHeader = br.ReadUInt16();
60 Characteristics = br.ReadUInt16();
61 }
62
63 }
64
65}
System.UInt32 DWORD
System.UInt16 WORD