Show / Hide Table of Contents

Class ImageResourceDirectoryEntry

The resource directory entry represents one entry (e.g. icon) in a resource directory.

Inheritance
object
AbstractStructure
ImageResourceDirectoryEntry
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: PeNet.Header.Pe
Assembly: PeNet.dll
Syntax
public class ImageResourceDirectoryEntry : AbstractStructure

Constructors

| Edit this page View Source

ImageResourceDirectoryEntry(IRawFile, ImageResourceDirectory, long, long)

Create a new instance of the ImageResourceDirectoryEntry.

Declaration
public ImageResourceDirectoryEntry(IRawFile peFile, ImageResourceDirectory parent, long offset, long resourceDirOffset)
Parameters
Type Name Description
IRawFile peFile

A PE file.

ImageResourceDirectory parent

ImageResourceDirectoryEntry in which this entry resides.

long offset

Raw offset to the entry.

long resourceDirOffset

Raw offset to the resource directory.

Properties

| Edit this page View Source

DataIsDirectory

True if the entry data is a directory

Declaration
public bool DataIsDirectory { get; }
Property Value
Type Description
bool
| Edit this page View Source

ID

The ID if its a ID resource. You can resolve the ID to a string with Utility.ResolveResourceId(id)

Declaration
public uint ID { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

IsIdEntry

True if the entry is a resource with an ID instead of a name.

Declaration
public bool IsIdEntry { get; }
Property Value
Type Description
bool
| Edit this page View Source

IsNamedEntry

True if the entry is a resource with a name.

Declaration
public bool IsNamedEntry { get; }
Property Value
Type Description
bool
| Edit this page View Source

Name

Address of the name if its a named resource.

Declaration
public uint Name { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

NameResolved

The resolved name as a string if it's a named resource or a known resource ID.

Declaration
public string? NameResolved { get; }
Property Value
Type Description
string
| Edit this page View Source

OffsetToData

Offset to the data.

Declaration
public uint OffsetToData { get; set; }
Property Value
Type Description
uint
| Edit this page View Source

OffsetToDirectory

Offset to the next directory.

Declaration
public uint OffsetToDirectory { get; }
Property Value
Type Description
uint
| Edit this page View Source

Parent

ImageResourceDirectoryEntry in which this entry resides.

Declaration
public ImageResourceDirectory Parent { get; }
Property Value
Type Description
ImageResourceDirectory
| Edit this page View Source

ResourceDataEntry

Get the Resource Data Entry if the entry is no directory.

Declaration
public ImageResourceDataEntry? ResourceDataEntry { get; }
Property Value
Type Description
ImageResourceDataEntry
| Edit this page View Source

ResourceDirectory

Get the Resource Directory which the Directory Entry points to if the Directory Entry has DataIsDirectory set.

Declaration
public ImageResourceDirectory? ResourceDirectory { get; }
Property Value
Type Description
ImageResourceDirectory

Methods

| Edit this page View Source

ResolveResourceId(uint)

Resolve the resource identifier of resource entries to a human readable string with a meaning.

Declaration
public static string ResolveResourceId(uint id)
Parameters
Type Name Description
uint id

Resource identifier.

Returns
Type Description
string

String representation of the ID.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX