mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 13:46:03 +00:00
Add PE message resource models
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace BurnOutSharp.Models.PortableExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information about message strings with identifiers in the range indicated
|
||||
/// by the LowId and HighId members.
|
||||
/// </summary>
|
||||
/// <see href="https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-message_resource_block"/>
|
||||
public class MessageResourceBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// The lowest message identifier contained within this structure.
|
||||
/// </summary>
|
||||
public uint LowId;
|
||||
|
||||
/// <summary>
|
||||
/// The highest message identifier contained within this structure.
|
||||
/// </summary>
|
||||
public uint HighId;
|
||||
|
||||
/// <summary>
|
||||
/// The offset, in bytes, from the beginning of the MESSAGE_RESOURCE_DATA structure to the
|
||||
/// MESSAGE_RESOURCE_ENTRY structures in this MESSAGE_RESOURCE_BLOCK. The MESSAGE_RESOURCE_ENTRY
|
||||
/// structures contain the message strings.
|
||||
/// </summary>
|
||||
public uint OffsetToEntries;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace BurnOutSharp.Models.PortableExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information about formatted text for display as an error message or in a message
|
||||
/// box in a message table resource.
|
||||
/// </summary>
|
||||
/// <see href="https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-message_resource_data"/>
|
||||
public class MessageResourceData
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of MESSAGE_RESOURCE_BLOCK structures.
|
||||
/// </summary>
|
||||
public uint NumberOfBlocks;
|
||||
|
||||
/// <summary>
|
||||
/// An array of structures. The array is the size indicated by the NumberOfBlocks member.
|
||||
/// </summary>
|
||||
public MessageResourceBlock[] Blocks;
|
||||
|
||||
/// <summary>
|
||||
/// Message resource entries
|
||||
/// </summary>
|
||||
public MessageResourceEntry[] Entries;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace BurnOutSharp.Models.PortableExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the error message or message box display text for a message table resource.
|
||||
/// </summary>
|
||||
/// <see href="https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-message_resource_entry"/>
|
||||
public class MessageResourceEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// The length, in bytes, of the MESSAGE_RESOURCE_ENTRY structure.
|
||||
/// </summary>
|
||||
public ushort Length;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the string is encoded in Unicode, if equal to the value 0x0001.
|
||||
/// Indicates that the string is encoded in ANSI, if equal to the value 0x0000.
|
||||
/// </summary>
|
||||
public ushort Flags;
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to an array that contains the error message or message box display text.
|
||||
/// </summary>
|
||||
public string Text;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user