Table of Contents

Class SerializedResourceDirectory

Namespace
AsmResolver.PE.Win32Resources
Assembly
AsmResolver.PE.dll

Provides an implementation of a resource directory that was read from an existing PE file.

public class SerializedResourceDirectory : ResourceDirectory, IResourceEntry, IOwnedCollectionElement<ResourceDirectory>
Inheritance
SerializedResourceDirectory
Implements
Inherited Members

Constructors

SerializedResourceDirectory(PEReaderContext, ResourceDirectoryEntry?, ref BinaryStreamReader, int)

Reads a single resource directory from an input stream.

public SerializedResourceDirectory(PEReaderContext context, ResourceDirectoryEntry? entry, ref BinaryStreamReader directoryReader, int depth = 0)

Parameters

context PEReaderContext

The reader context.

entry ResourceDirectoryEntry?

The entry to read. If this value is null, the root directory is assumed.

directoryReader BinaryStreamReader

The input stream.

depth int

The current depth of the resource directory tree structure. If this value exceeds MaxDepth, this class will not initialize any entries.

Fields

MaxDepth

Indicates the maximum depth of sub directories a resource directory can have before AsmResolver aborts reading the resource tree branch.

public const int MaxDepth = 10

Field Value

int

ResourceDirectorySize

Indicates the size of a single sub-directory entry in a resource directory.

public const uint ResourceDirectorySize = 16

Field Value

uint

Methods

GetEntries()

Obtains the list of entries in the directory.

protected override IList<IResourceEntry> GetEntries()

Returns

IList<IResourceEntry>

The list of entries.

Remarks

This method is called upon initialization of the Entries property.