Results 1 to 11 of 11

Thread: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confused!

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    Question 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:
    Name:  cheatengine.png
Views: 207
Size:  13.7 KB

    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'

    Name:  cheatengine2.png
Views: 204
Size:  10.3 KB

    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.

  2. #2

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    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.

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,923

    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.
    .

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    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.

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    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

  6. #6
    Frenzied Member
    Join Date
    Jul 2011
    Location
    UK
    Posts
    1,329

    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

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse

    Quote Originally Posted by Inferrd View Post
    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?

  8. #8
    Frenzied Member
    Join Date
    Jul 2011
    Location
    UK
    Posts
    1,329

    Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse

    Quote Originally Posted by pursuited357 View Post
    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.

  9. #9

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    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)))))

  10. #10

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    7

    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.

  11. #11
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,913

    Re: How do I code pointers in Visual Basic? (Relating to Cheat Engine) I'm so confuse

    Quote Originally Posted by pursuited357 View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width