 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
whoarere How do I cheat?
Reputation: 0
Joined: 10 Jan 2009 Posts: 9
|
Posted: Tue Feb 17, 2009 6:56 pm Post subject: Byte Arrays in VB? |
|
|
Alright... I've been trying to make a trainer on VB2008, and I noticed that some of the bigger numbers caused overflow errors.
Right now, I'm trying to do:
Writememory(&H4BD7B03B, 4294967103, 4)
But since a byte can't hold that much data, my program keeps crashing.
So I'm guessing I need to convert that into byte arrays, which would be...
Hex: ffffff3f
Byte Array: F3 FF FF FF 00
So I'm wondering...
What is the code that is like WriteMemory except for byte arrays?
I'm pretty sure it wouldn't be Writememory(&H4BD7B03B, 0xF3 0xFF 0xFF 0xFF 0x00, 4)...
I couldn't find out how to do this in Cheat Engine either...
Thanks for your help
|
|
| Back to top |
|
 |
Matt-h4ck3r Newbie cheater
Reputation: 0
Joined: 19 Feb 2009 Posts: 16
|
Posted: Sun Feb 22, 2009 6:31 pm Post subject: |
|
|
i think it is writememory,,
your using visual basics right?
|
|
| Back to top |
|
 |
W1z8it How do I cheat?
Reputation: 0
Joined: 19 Feb 2009 Posts: 3
|
Posted: Sun Feb 22, 2009 6:45 pm Post subject: |
|
|
The second parameter should be a pointer, to the buffer holding your value, not the value itself...
Try this
| Code: | Public Shared Function VarPtr(ByVal e As Object) As Integer
Dim GC As GCHandle = GCHandle.Alloc(e, GCHandleType.Pinned)
Dim GC2 As Integer = GC.AddrOfPinnedObject.ToInt32
GC.Free()
Return GC2
End Function
Public Shared Sub MyFunc()
Dim my_var As Long = 4294967103
Dim my_var_prt = VarPtr(my_var)
Writememory(&H4BD7B03B, my_var_prt, 8)
End Sub Sub |
Edit: And because your value is a long, in vb.net that's 64 bits (8 bytes, not 4)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|