Skip to content

Commit b99e050

Browse files
authored
Add files via upload
1 parent 1136235 commit b99e050

File tree

6 files changed

+4
-4
lines changed

6 files changed

+4
-4
lines changed

NullMemory/NullMemory.Demo/MainForm.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ private void MainForm_Load(object sender, EventArgs e)
6161
6262
*/
6363

64-
int EngineBase = new NullMemory.Kernel(nullMem).Read<int>((IntPtr)engine.Address + clientstate);
64+
int EngineBase = nullMem.Read<int>(engine.Address + clientstate);
6565
string resultText = "dwClientState => 0x" + clientstate.ToString("X") + Environment.NewLine +
6666
"dwClientState_State => 0x" + (clientstate_state).ToString("X") + Environment.NewLine +
67-
"dwState => " + new NullMemory.Kernel(nullMem).Read<int>((IntPtr)EngineBase + clientstate_state).ToString();
67+
"dwState => " + nullMem.Read<int>(EngineBase + clientstate_state).ToString();
6868
MessageBox.Show(resultText, "Null Memory", MessageBoxButtons.OK, MessageBoxIcon.Information);
6969
}
7070
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

NullMemory/NullMemory/NullMemory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public bool ProcessIsRunning()
112112
private int m_iNumberOfBytesRead;
113113
private int m_iNumberOfBytesWritten;
114114

115-
public T ReadMemory<T>(int address) where T : struct
115+
public T Read<T>(int address) where T : struct
116116
{
117117
int ByteSize = Marshal.SizeOf(typeof(T));
118118

@@ -170,7 +170,7 @@ public float[] ReadMatrix<T>(int address, int MatrixSize) where T : struct
170170
return ConvertToFloatArray(buffer);
171171
}
172172

173-
public void WriteMemory<T>(int address, object Value) where T : struct
173+
public void Write<T>(int address, object Value) where T : struct
174174
{
175175
byte[] buffer = StructureToByteArray(Value);
176176

0 commit comments

Comments
 (0)