If you can't write values higher than 255 using a single byte.. use 2 bytes... then you can go up to 65.535 or 4 bytes (Integer).. up to 4.294.967.295 (considering it is unsigned ofc)
byte[] bytes = BitConverter.GetBytes(int.parse(textbox.Text))
I am trying to add Experience to my Simple Prestige Hack but i cannot use the same code i did for the prestige to modify the experience.
That is how i write my data. It gets the Process (iw5mp) and then gets the Address (Exp) and Then gets the vBufferCode:WriteProcessMemory(processHandle, Address(0), vBuffer(0), 4, 0)
which is wear i get my error. I cannot write a value greater then 255 to a byte.Code:vBuffer(0) = Convert.ToByte(TextBox1.Text)
How would i write a value greater then 255 to the Experience address in VB.NET?
I'm Using Framework 4.5
If you can't write values higher than 255 using a single byte.. use 2 bytes... then you can go up to 65.535 or 4 bytes (Integer).. up to 4.294.967.295 (considering it is unsigned ofc)
byte[] bytes = BitConverter.GetBytes(int.parse(textbox.Text))
CoD Minion from 09/19/2012 to 01/10/2013
Returns this errorCode:Dim bits(0 To 1) As Byte bits = BitConverter.GetBytes(Int32.Parse(TextBox2.Text)) vBuffer(0) = Convert.ToInt64(bits)
What else should i try?Code:Unable to cast object of type 'System.Byte[]' to type 'System.IConvertible'.
You should try to learn how to use Google
from MSDN:
Then use WriteProcessMemory to write the returnValue arrayCode:Public Shared Function GetBytes ( _ value As Long _ ) As Byte() Dim value As Long Dim returnValue As Byte() returnValue = BitConverter.GetBytes(value)
Last edited by MarkHC; 12-01-2012 at 06:28 AM.
CoD Minion from 09/19/2012 to 01/10/2013
Code:Public Shared Function Tolong( _ value As Int32 _ ) As Long End Function Public Shared Function GetBytes( _ value As Long _ ) As Byte() End Function Dim value As Long Dim returnValue As Byte() Address(0) = &H1DBD238 'This is the equivalent of 01DBD238 in cheatengine value = Tolong(Convert.ToInt32(TextBox2.Text)) returnValue = BitConverter.GetBytes(value) VirtualProtectEx(processHandle, Address(0), 4, PAGE_READWRITE, 0) WriteProcessMemory(processHandle, Address(0), vBuffer(0), 4, 0)
I do not get an error anymore but it does not change my Experience level
Edit: I would assume its the "value = Tolong(Convert.ToInt32(TextBox2.Text))" That is incorrectly reading my experience level in the textbox
Last edited by ikillindreams; 12-01-2012 at 11:34 AM.