25 lines
841 B
C#
25 lines
841 B
C#
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")
|
|
};
|
|
}
|
|
}
|
|
} |