Update WinApi

This commit is contained in:
2025-07-02 18:13:00 +03:00
parent 49abc808a4
commit 09af9d5091
6 changed files with 260 additions and 49 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ namespace WebmrAPI.Models
}
public string? BaseAddress
{
get => (MemoryAddress > 0) ? $"0x{MemoryAddress:X12}" : null;
get => (MemoryAddress > 0) ? $"0x{MemoryAddress:X16}" : null;
}
}
}
+8 -6
View File
@@ -1,24 +1,26 @@
// File: Models/MemoryRegionInfo.cs
using WebmrAPI.Services;
namespace WebmrAPI.Models
{
public class MemoryRegionInfo : MemoryRegion
{
private string _state = String.Empty;
private string _protect = String.Empty;
private string _type = String.Empty;
private WinApi.MemoryState _state = 0;
private WinApi.MemoryPageProtectionState _protect = 0;
private WinApi.MemoryType _type = 0;
public string State
public WinApi.MemoryState MemoryState
{
get => LockedGet(ref _state);
set => LockedSet(ref _state, value);
}
public string Protect
public WinApi.MemoryPageProtectionState MemoryPageProtection
{
get => LockedGet(ref _protect);
set => LockedSet(ref _protect, value);
}
public string Type
public WinApi.MemoryType MemoryType
{
get => LockedGet(ref _type);
set => LockedSet(ref _type, value);
+1 -1
View File
@@ -34,7 +34,7 @@ namespace WebmrAPI.Models
[JsonIgnore]
public double ProcessorTime
{
get { lock (_lock) return (_lastPTime - _curPTime).TotalMilliseconds; }
get { lock (_lock) return (_curPTime - _lastPTime).TotalMilliseconds; }
}
public int PID
{