CLR Based PE (Portable Executable) Files

This section provides a tutorial example on how to use the .NET Intermediate Language disassembler to view PE headers and CLR headers of the executable files generated by the .NET C# compiler.

Once a CLR based PE file is opened in the .NET IL Disassembler, we can view its headers:

1. Open HelloCLR.exe in .NET IL Disassembler.

2. Click "Headers" > "View" in the menu. You will see headers of HelloCLR.exe displayed in a text window:

 ----- DOS Header:
 Magic:                      0x5a4d
 Bytes on last page:         0x0090
 Pages in file:              0x0003
 Relocations:                0x0000
 Size of header (paragraphs):0x0004
 ...
 ----- COFF/PE Headers:
 Signature:                  0x00004550
 ----- COFF Header:
 Machine:                    0x014c
 Number of sections:         0x0003
 Time-date stamp:            0x4cf95b45
 ...
 ----- PE Optional Header (32 bit):
 Magic:                          0x010b
 Major linker version:           0x08
 Minor linker version:           0x00
 Size of code:                   0x00000400
 ...
 ----- CLR Header:
 Header size:                        0x00000048
 Major runtime version:              0x0002
 Minor runtime version:              0x0005
 ...

The PE header and the CLR header shows that HelloCLR.exe is a PE file and requires CLR to execute.

Last update: 2010.

Table of Contents

 About This Book

 Introduction of C# (C Sharp)

 Data Type and Variables

 Logical Expressions and Conditional Statements

 Arrays and Loop Statements

 Data Type Features

 Floating-Point Data Types

 Passing Parameters to Methods

 Execution Environment Class

 Visual C# 2010 Express Edition

 Class Features

C# Compiler and Intermediate Language

 Compiling and Running C# Programs

 Compilation - Converting Source Code to Bytecode

 .NET Intermediate Language Disassembler

CLR Based PE (Portable Executable) Files

 Disassembling Intermediate Language Bytecode

 Assembling Intermediate Language Source Code

 Compiling C# Source Code Files

 MSBuild - Microsoft Build Engine

 Memory Usages of Processes

 Multithreading in C#

 Async Feature from C# 5

 System.IO.FileInfo Class

 System.Diagnostics.FileVersionInfo Class

 WPF - Windows Presentation Foundation

 Partial Classes and Partial Methods

 Outdated Tutorials

 References

 PDF Printing Version