-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathProperties.cs
99 lines (86 loc) · 1.65 KB
/
Properties.cs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Com.Xenthrax.DllInjector
{
public partial class DllInjector : IDisposable
{
#region Members
private bool Disposed = false;
private bool _FreeOnDispose;
private Process _Process;
private bool? _Is64BitProcess;
private bool? _IsWow64Process;
#endregion
#region Properties
public bool FreeOnDispose
{
get
{
this.ThrowIfDisposed();
return this._FreeOnDispose;
}
private set
{
this._FreeOnDispose = value;
}
}
public Process Process
{
get
{
this.ThrowIfDisposed();
return this._Process;
}
private set
{
this._Process = value;
}
}
public bool Is64BitProcess
{
get
{
this.ThrowIfDisposed();
if (!this._Is64BitProcess.HasValue)
this._Is64BitProcess = Utilities.Is64BitProcess(this.Process);
return this._Is64BitProcess.Value;
}
}
public bool IsWow64Process
{
get
{
this.ThrowIfDisposed();
if (!this._IsWow64Process.HasValue)
this._IsWow64Process = Utilities.IsWow64Process(this.Process);
return this._IsWow64Process.Value;
}
}
public int PointerSize
{
get
{
this.ThrowIfDisposed();
return this.Is64BitProcess ? 8 : 4;
}
}
public bool HasProcessHandle
{
get
{
this.ThrowIfDisposed();
return this.hProc != IntPtr.Zero;
}
}
public bool HasCommonLanguageRuntime
{
get
{
this.ThrowIfDisposed();
return this.Clr != null && this.Clr.ppClrHost != IntPtr.Zero;
}
}
#endregion
}
}