Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Virtual address of pointer keeps changing

Virtual address of pointer keeps changing

Scheduled Pinned Locked Moved C / C++ / MFC
c++game-devdata-structuresperformancequestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rakanoth
    wrote on last edited by
    #1

    I implemented a small C++ app that reads the memory of a video game. My aim is to create a small cheat for the single-player game. I am reading the memory of a video game from another process. There is a linked list that I am trying to read in the game's memory. I am following a pointer chain to follow the linked list. These pointers point to next element in the linked list. Each time I read the pointer's address, it is something different. Why are the virtual addresses of the pointers always different when I read them?

    L S 2 Replies Last reply
    0
    • R Rakanoth

      I implemented a small C++ app that reads the memory of a video game. My aim is to create a small cheat for the single-player game. I am reading the memory of a video game from another process. There is a linked list that I am trying to read in the game's memory. I am following a pointer chain to follow the linked list. These pointers point to next element in the linked list. Each time I read the pointer's address, it is something different. Why are the virtual addresses of the pointers always different when I read them?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Rakanoth wrote:

      Why are the virtual addresses of the pointers always different when I read them?

      To stop you hacking their game.

      R 1 Reply Last reply
      0
      • L Lost User

        Rakanoth wrote:

        Why are the virtual addresses of the pointers always different when I read them?

        To stop you hacking their game.

        R Offline
        R Offline
        Rakanoth
        wrote on last edited by
        #3

        Why? I am not cheating in online games.

        OriginalGriffO 1 Reply Last reply
        0
        • R Rakanoth

          Why? I am not cheating in online games.

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          Quote:

          My aim is to create a small cheat for the single-player game.

          Still cheating.

          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          R 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Quote:

            My aim is to create a small cheat for the single-player game.

            Still cheating.

            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            R Offline
            R Offline
            Rakanoth
            wrote on last edited by
            #5

            I was expecting a technical explanation. Would you please give me some technical explanation about how it changes?

            OriginalGriffO 1 Reply Last reply
            0
            • R Rakanoth

              I was expecting a technical explanation. Would you please give me some technical explanation about how it changes?

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #6

              Why would you expect them to remain the same in a game that is running? I have no idea what game you are trying to cheat, but you are reading the memory of a different process, so it will get run, stopped, loaded, unloaded, cached, paged to disk, and generally have a hard life - all at the whim of the operating system. Add in that the game itself will probably be moving stuff around as it runs to suit itself, and the chances of you finding exactly what you want without the source code to work form is very unlikely. And that is assuming that you have identified the actual linked list, rather than some stack based object that temporarily looked like an element that might be on a linked list, if the code actually used one. So why would you expect everything to stay in the same place for your convenience? :laugh:

              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              1 Reply Last reply
              0
              • R Rakanoth

                I implemented a small C++ app that reads the memory of a video game. My aim is to create a small cheat for the single-player game. I am reading the memory of a video game from another process. There is a linked list that I am trying to read in the game's memory. I am following a pointer chain to follow the linked list. These pointers point to next element in the linked list. Each time I read the pointer's address, it is something different. Why are the virtual addresses of the pointers always different when I read them?

                S Offline
                S Offline
                Stefan_Lang
                wrote on last edited by
                #7

                If you have to ask this, then I doubt that the address you're reading is what you think it is. Not to mention what it points to. Every process uses it's own mapping from it's address space to the underlying physical addresses, and the system functions take care that each address used within a process is mapped accordingly: to some location within the momry space that is associated to this, and only this, process! Consequently, a process can never access memory from another process, unless the two processes are set up specifically for that purpose: the only way I know to read memory from another process is setting up shared memory. And I doubt that your game allows this. Take this with a grain of salt and a big AFAIK - I'm anything but a specialist on this topic ;-)

                GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups