-
Apr 25th, 2021, 03:52 PM
#1
Thread Starter
New Member
How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confused!
I use Cheat Engine and in Cheat Engine you have Memory Addresses and Pointers. In Cheat Engine I got my Memory and Pointers to work just fine.
Now trying to do this Visual Basic is a pain. I must be misunderstanding something. This is what Cheat Engine has and this is what I am trying to code in Visual Basic:
Here is the code I am trying:
Variables:
Code:
baseaddress = 00007FF73EE70000
GV.addresses = 01DB81B0
pointer = A4
When I add 'baseaddress' and 'GV.addresses' I get: '7FF740C281B0 ' Which is Mathematically correct.
Now I know a Pointer points to a Memory Address that has a Memory Address in it which is a 4Byte. Then you read that address and add the pointer.
My Code will show the correct value of '00007FF73EE70000' + '01DB81B0' (which is '7FF740C281B0')
Code:
Dim testt As Long
testt = (Convert.ToInt64(baseaddress, 16) + (GV.addresses))
MsgBox(Hex(testt))
But no matter how much I play with '7FF740C281B0' I can't get Cheat Engines Value of '1C6B64B70F4'.
I thought it worked like you read the Address in Hex stored at '00007FF73EE70000' + '01DB81B0' (baseaddress + GV.addresses). Then you take that addressed that is stored there and add the pointer A4.
But the value in Cheat Engine stored at ('00007FF73EE70000' + '01DB81B0') is '3058397264'
And none of those will point to '1C6B64B70F4'.
I need to get the Address '1C6B64B70F4' to add the pointer of 'A4'
What am I doing wrong here????
I am so confused on this... Can anyone help sort this mess out for me?
AND OF COURSE THANKS IN ADVANCED!
I hope that because I am referencing Cheat Engine here that it does not break any rules. But I am relating this to a Visual Basic issue, so I thought it would be ok. If not, I apologize.
-
Apr 25th, 2021, 04:01 PM
#2
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
I should note that this has NOTHING TO WITH CHEATING in a game. I am trying to read memory addresses in a game and display them to help keep track of a Characters Progress.
I am reading variables such as HP, MP, and Coordinates. I then want to store the variables and keep track of there changes.
I am not trying to modify any memory addresses.
I am just reading memory addresses.
-
Apr 25th, 2021, 04:20 PM
#3
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
I think this is a big no no .
I probably know how to get memory addresses but don't think vb or c# will allow that on reserved game memory.
I think C or C++ would be more appropriate.
Again, personally I can't help.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Apr 25th, 2021, 04:22 PM
#4
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
I know it can be done because I have done it before a while back, I just lost the source code.
I had someone help me do it then as I was confused then. But again, it is possible.
@sapator: Thanks for the reply though, I appreciate the comment.
-
Apr 25th, 2021, 04:24 PM
#5
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Oh I should mention that I can read memory addresses that do not involve pointers.
In case you are wondering, I am using this to do the Reading and Writing of memory:
http://www.mediafire.com/file/yvpjbi...Memory.vb/file
-
Apr 25th, 2021, 07:13 PM
#6
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Looks like your memory addresses are 8 Byte, not 4 Byte.
In your first image you have 1C6B64B7050 + A4 = 1C6B64B70F4
and in your last image where you have 'Type' set to '4 Bytes', you have
00007FF73EE70000 +01DB81B0 = B64B7050
So you're just missing the 4 high order bytes from the address value 000001C6B64B7050
Last edited by Inferrd; Apr 25th, 2021 at 07:19 PM.
Reason: added some 0's for effect
-
Apr 25th, 2021, 08:35 PM
#7
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Originally Posted by Inferrd
Looks like your memory addresses are 8 Byte, not 4 Byte.
In your first image you have 1C6B64B7050 + A4 = 1C6B64B70F4
and in your last image where you have 'Type' set to '4 Bytes', you have
00007FF73EE70000 +01DB81B0 = B64B7050
So you're just missing the 4 high order bytes from the address value 000001C6B64B7050
So how would I go about getting the "missing 4 higher order bytes"?
Is there a way to code that?
-
Apr 26th, 2021, 09:27 AM
#8
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Originally Posted by pursuited357
So how would I go about getting the "missing 4 higher order bytes"?
Is there a way to code that?
You probably want to start by rewriting your code library so it can properly handle 64 bit processes and their use of a 47 bit address space.
-
Apr 28th, 2021, 11:53 PM
#9
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Either way I figured it out with the code I got.
Code:
ReadMemory(Of Single)(((ReadMemory(Of Long)(CLng(&H7FF740C281B0)) + CLng(GV.addresses)))))
-
May 4th, 2021, 04:53 AM
#10
Thread Starter
New Member
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
If someone would like a nice pictured tutorial for this process, let me know and id be glad to do one.
-
May 4th, 2021, 02:10 PM
#11
Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse
Originally Posted by pursuited357
If someone would like a nice pictured tutorial for this process, let me know and id be glad to do one.
Write up a tutorial article in the codebank...
probably be interesting to a lot of people, but the vbgeneral forum isn’t the place for it.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|