Class ImageResourceDirectoryEntry
The resource directory entry represents one entry (e.g. icon) in a resource directory.
Namespace: PeNet.Header.Pe
Assembly: PeNet.dll
Syntax
public class ImageResourceDirectoryEntry : AbstractStructure
Constructors
| Improve this Doc View SourceImageResourceDirectoryEntry(IRawFile, ImageResourceDirectory, Int64, Int64)
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. |
System.Int64 | offset | Raw offset to the entry. |
System.Int64 | resourceDirOffset | Raw offset to the resource directory. |
Properties
| Improve this Doc View SourceDataIsDirectory
True if the entry data is a directory
Declaration
public bool DataIsDirectory { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.UInt32 |
IsIdEntry
True if the entry is a resource with an ID instead of a name.
Declaration
public bool IsIdEntry { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNamedEntry
True if the entry is a resource with a name.
Declaration
public bool IsNamedEntry { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Address of the name if its a named resource.
Declaration
public uint Name { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
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 |
---|---|
System.Nullable<System.String> |
OffsetToData
Offset to the data.
Declaration
public uint OffsetToData { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
OffsetToDirectory
Offset to the next directory.
Declaration
public uint OffsetToDirectory { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Parent
ImageResourceDirectoryEntry in which this entry resides.
Declaration
public ImageResourceDirectory Parent { get; }
Property Value
Type | Description |
---|---|
ImageResourceDirectory |
ResourceDataEntry
Get the Resource Data Entry if the entry is no directory.
Declaration
public ImageResourceDataEntry ResourceDataEntry { get; }
Property Value
Type | Description |
---|---|
ImageResourceDataEntry |
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
| Improve this Doc View SourceResolveResourceId(UInt32)
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 |
---|---|---|
System.UInt32 | id | Resource identifier. |
Returns
Type | Description |
---|---|
System.String | String representation of the ID. |