PEHeaders Constructors

Definition

Overloads

PEHeaders(Stream)

Instantiates a new instance of the PEHeaders class that reads the PE headers from the current location in the specified stream.

PEHeaders(Stream, Int32)

Instantiates a new instance of the PEHeaders class that reads the PE headers from a stream that represents a PE image of a specified size.

PEHeaders(Stream, Int32, Boolean)

Instantiates a new instance of the PEHeaders class that reads the PE headers from a stream that represents a PE image of a specified size and indicates whether the PE image has been loaded into memory.

PEHeaders(Stream)

Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs

Instantiates a new instance of the PEHeaders class that reads the PE headers from the current location in the specified stream.

C#
public PEHeaders(System.IO.Stream peStream);

Parameters

peStream
Stream

A stream containing the PE image starting at the stream's current position and ending at the end of the stream.

Exceptions

The data read from the stream has an invalid format.

Error reading from the stream.

The stream does not support seek operations.

peStream is null.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

PEHeaders(Stream, Int32)

Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs

Instantiates a new instance of the PEHeaders class that reads the PE headers from a stream that represents a PE image of a specified size.

C#
public PEHeaders(System.IO.Stream peStream, int size);

Parameters

peStream
Stream

A stream containing PE image of the given size starting at its current position.

size
Int32

The size of the PE image.

Exceptions

The data read from the stream has an invalid format.

Error reading from the stream.

The stream does not support seek operations.

peStream is null.

size is negative or extends past the end of the stream.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

PEHeaders(Stream, Int32, Boolean)

Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs
Source:
PEHeaders.cs

Instantiates a new instance of the PEHeaders class that reads the PE headers from a stream that represents a PE image of a specified size and indicates whether the PE image has been loaded into memory.

C#
public PEHeaders(System.IO.Stream peStream, int size, bool isLoadedImage);

Parameters

peStream
Stream

The stream containing PE image of the given size starting at its current position.

size
Int32

The size of the PE image.

isLoadedImage
Boolean

true if the PE image has been loaded into memory by the OS loader; otherwise, false.

Exceptions

The data read from the stream has invalid format.

Error reading from the stream.

The stream does not support seek operations.

peStream is null.

size is negative or extends past the end of the stream.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)