these are the 2 functions that do the work
Code: Select all
[DllImport("kernel32.dll")]
public static extern unsafe bool WriteProcessMemory(int hProcess, int lpBaseAddress, float* lpBuffer, int nSize, int lpNumberOfBytesWritten);
public unsafe bool WriteToMemoryS(float fltPoke, int num)
{
if (clsMemoryWriters.WriteProcessMemory(this.InitProc(this.strProc), num + 0x19, &fltPoke, 4, 0))
{
return true;
}
return false;
}
and
Code: Select all
private void spdbtn_Click(object sender, EventArgs e)
{
float single1 = (float) this.numericUpDown1.Value;
clsMemoryWriters writers1 = new clsMemoryWriters();
writers1.strProc = "EverQuest2";
int num1 = 0xd58f93;
float single2 = single1;
writers1.WriteToMemoryS(single2, num1);
}
writers1 contains the first function above.