Jump to content
  • Advertisement
Sign in to follow this  
Hunter_Ex

Types and Pointer [EDIT FIRST]

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to check if the value can be used as a device
test = (LPDIRECT3DDEVICE9)(DWORD)2461152;
D3DXCreateSprite(test,&sprite);


that code will run fine if the device is valid but otherwize it will cast an "forbidden action" and shutdown program is it any way to prevent the game from shutdown so i can continue to check different values asa device until i find one thats not gives error?? cheers hunter [Edited by - Hunter_Ex on August 14, 2005 9:34:14 PM]

Share this post


Link to post
Share on other sites
Advertisement
No, not really. Nothing beyond informed guesses anyway.
For a debug version of the application it may be possible to recursively traverse the game's datastructures, starting the from pointers in the current call stack, and find the variable that way. But it'd be horribly slow and far from reliable.

Share this post


Link to post
Share on other sites
okay... the best tryed i did was to check the step beetween the pointers

etc.. 4 steps means a float or int 8 steps an double

is that reliable u think ??

Share this post


Link to post
Share on other sites
Quote:
Original post by Hunter_Ex
okay... the best tryed i did was to check the step beetween the pointers

etc.. 4 steps means a float or int 8 steps an double

is that reliable u think ??
You have an actual pointer of the right type? I assumed that you only had an address..
Then you can use try using the typeid operator on the dereferenced pointer (search for an article on RTTI for the details). It's not perfect but it should work in most cases.

Share this post


Link to post
Share on other sites
yes iknow but many types uses the same size ;)

and is it also impossible to get the name of the variable assigned to the pointer
?

Share this post


Link to post
Share on other sites
I mean where are you getting the step size from? A raw void pointer doesn't contain that information, so if you have the step size information then why don't you have the type of the pointer?

Share this post


Link to post
Share on other sites
i go trough a whole bunch of memory and the memory reader ive made only shows the pointer if the variable is there
so a INT will only reg the pointer at the first BYTE then it passes the next 3

but can i get the NAME of the variable using the pointer?

Share this post


Link to post
Share on other sites
Quote:
Original post by Hunter_Ex
but can i get the NAME of the variable using the pointer?


No. Names are only used while writing the program. After compilation, they're all gone, unless you keep the symbol table around, somehow. To the computer, the true name of a a variable is its address. That's where pointers come in.

Share this post


Link to post
Share on other sites
okay...

THIS IS NOT GONNA BE A HACK PROGRAM all i wanna do is read a variable on a specefic EXE with another exe

i have fixed the read thing i can read the value of a pointer on a specefic program but i have no clue on how to search..

i u know a way u can search a bit more or is my only hope to compare the values since last step or something

and hows the psuedo on how a hack tool work.. i havent tryed a hack tool but dont cant they find a certain variable??

and again
THIS IS NOT GONNA BE A HACK PROGRAM

thx hunter_ex

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!