winmr-api/Models/ProcessModuleInfo.cs

25 lines
841 B
C#
Raw Normal View History

2025-06-30 18:15:07 +03:00
using System.Diagnostics;
namespace WebmrAPI.Services
{
public class ProcessModuleInfo
{
public string? ModuleName { get; set; }
public string? FileName { get; set; }
public string? BaseAddress { get; set; }
public long MemorySize { get; set; }
public string? EntrypointAddress { get; set; }
public static ProcessModuleInfo FromProcessModule(ProcessModule module)
{
return new ProcessModuleInfo
{
ModuleName = module.ModuleName,
FileName = module.FileName,
BaseAddress = "0x" + module.BaseAddress.ToInt64().ToString("X"),
MemorySize = module.ModuleMemorySize,
EntrypointAddress = "0x" + module.EntryPointAddress.ToInt64().ToString("X")
};
}
}
}