New built-in plugin PEViewer

This commit is contained in:
ema
2024-12-15 10:05:35 +08:00
parent 883657f6d5
commit dc67ab0065
25 changed files with 2457 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System.Diagnostics;
namespace QuickLook.Plugin.PEViewer.PEImageParser;
/// <summary>
/// Represents a data directory of a PE image file.
/// </summary>
[DebuggerDisplay($"{nameof(ImageDataDirectory)}: Name = {{Name}}, VirtualAddress = {{VirtualAddress}}, Size = {{Size}}")]
public sealed class ImageDataDirectory
{
/// <summary>
/// Gets the name of the data directory. This may not be a valid enum value of <see cref="ImageDataDirectoryName" />, if the image has more than 14 data directories.
/// </summary>
public ImageDataDirectoryName Name { get; private set; }
/// <summary>
/// Gets the address of the first byte of a table or string that Windows uses.
/// </summary>
public uint VirtualAddress { get; private set; }
/// <summary>
/// Gets size of a table or string that Windows uses.
/// </summary>
public uint Size { get; private set; }
internal ImageDataDirectory(ImageDataDirectoryName name, uint virtualAddress, uint size)
{
Name = name;
VirtualAddress = virtualAddress;
Size = size;
}
}