-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessInfo.cs
More file actions
32 lines (29 loc) · 912 Bytes
/
Copy pathProcessInfo.cs
File metadata and controls
32 lines (29 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Diagnostics;
namespace ProCheatEngineCLI
{
public class ProcessInfo
{
public Process Process { get; private set; }
public string ProcessName { get; private set; }
public int Id { get; private set; }
public string MainModuleName { get; private set; }
public IntPtr MainModuleBase { get; private set; }
public ProcessInfo(Process process)
{
Process = process;
ProcessName = process.ProcessName;
Id = process.Id;
try
{
MainModuleName = process.MainModule?.ModuleName;
MainModuleBase = process.MainModule?.BaseAddress ?? IntPtr.Zero;
}
catch
{
MainModuleName = null;
MainModuleBase = IntPtr.Zero;
}
}
}
}