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. Finding a structures address

Finding a structures address

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmsregexhelptutorial
5 Posts 5 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.
  • X Offline
    X Offline
    Xen3h
    wrote on last edited by
    #1

    I use some structures in an app using pointers, basically everytime the program gets updated these addresses change slightly, I usually get told by someone what the address is. Basically I want to be able to automatically find the address of the structure in the app, but i'm not sure how to do it.. I think i remember someone saying pattern searching or something. Any help is appreciated. :)

    D P G J 4 Replies Last reply
    0
    • X Xen3h

      I use some structures in an app using pointers, basically everytime the program gets updated these addresses change slightly, I usually get told by someone what the address is. Basically I want to be able to automatically find the address of the structure in the app, but i'm not sure how to do it.. I think i remember someone saying pattern searching or something. Any help is appreciated. :)

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      I think I know what you are asking, but your comments make me think otherwise. Have you tried the address-of operator?


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      1 Reply Last reply
      0
      • X Xen3h

        I use some structures in an app using pointers, basically everytime the program gets updated these addresses change slightly, I usually get told by someone what the address is. Basically I want to be able to automatically find the address of the structure in the app, but i'm not sure how to do it.. I think i remember someone saying pattern searching or something. Any help is appreciated. :)

        P Offline
        P Offline
        Prakash Nadar
        wrote on last edited by
        #3

        What do you use the address for ? is it a memeory address or a file offset number ?


        MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"

        1 Reply Last reply
        0
        • X Xen3h

          I use some structures in an app using pointers, basically everytime the program gets updated these addresses change slightly, I usually get told by someone what the address is. Basically I want to be able to automatically find the address of the structure in the app, but i'm not sure how to do it.. I think i remember someone saying pattern searching or something. Any help is appreciated. :)

          G Offline
          G Offline
          gUrM33T
          wrote on last edited by
          #4

          Your question is not clear. Gurmeet S. Kochar


          If you believe in God, it's because of the Devil

          1 Reply Last reply
          0
          • X Xen3h

            I use some structures in an app using pointers, basically everytime the program gets updated these addresses change slightly, I usually get told by someone what the address is. Basically I want to be able to automatically find the address of the structure in the app, but i'm not sure how to do it.. I think i remember someone saying pattern searching or something. Any help is appreciated. :)

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            This question makes no since! What do you mean by "...someone what the address is." Either the code knows what the address is or it doesn't. You might know what the address is at a given run of the program and your debugger might give you the same address every time you rebuild, until you modify the code. But the address may be relitive to the base address of your program or it may be allocated (could be anywhere). You should never need to know the actual address (except maybe when debugging). Pattern searching has nothing to do with finding an address.

            /* in C */
            struct whatever {...};
            struct whatever* pAddr; /* uninitialized pointer/address */
            or
            myfunct(struct whatever* pAddr)
            {
            /* modify stucture whatever */
            }

            // in C++
            struct whaterver {...};
            whatever* pAddr; /* uninitialized pointer/address */
            or
            myfunct(whatever* pAddr)
            {
            /* modify stucture whatever */
            }

            INTP

            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