Finding a structures address
-
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. :)
-
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. :)
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)
-
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. :)
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++"
-
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. :)
-
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. :)
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