|
-
Mar 8th, 2002, 07:23 PM
#1
Thread Starter
Hyperactive Member
VERY HARD Pointer Question
Ok I want to know how to get data at an addresss, or i dont know the address in memory but i know where it starts and i am looking for a value. I am looking for something that starts at ffff:0000 How can i scan the data starting at this address.
EX
go to msdos and type debug then type d ffff:0000 and press enter
I want to be able to look at any memory address on my computer
-
Mar 8th, 2002, 07:34 PM
#2
Code:
BYTE* p = 0xffff0000;
cout << *p << endl;
Be careful of where you use that, Im not sure if you will get access violations if you try to dereference memory outside of your process.
Z.
-
Mar 8th, 2002, 08:22 PM
#3
Thread Starter
Hyperactive Member
borland
ok im useing Turbo C++ for dos so I dont have the byte variable type. So i set it as an unsigned long
EX
unsigned long *moo = 0xffff0000;
cout << *moo << endl;
and i get an error, saying i can not convert unsigned long to unsigned long * any ideas?
-
Mar 8th, 2002, 08:28 PM
#4
New Member
Maybe you need to #include something to get the BYTE data type? check out MSDN
-
Mar 8th, 2002, 08:46 PM
#5
Thread Starter
Hyperactive Member
I am useing a c++ for DOS a compiler that was written back in 1990...so dont think MSDN will know what i am talking about i am not useing Visual C++.
-
Mar 8th, 2002, 10:36 PM
#6
Change BYTE to char. You will also have to worry about far pointers. Your compiler should have come with help files, and you should do a bit of searching on the net for 16 bit pointers (my code uses 32 bit pointers).
Z.
-
Mar 9th, 2002, 06:00 AM
#7
Monday Morning Lunatic
If you're running any program under Windows you won't have access to memory outside of your program (DOS ones can sometimes get away with it for certain addresses).
The best thing is to write a virtual device driver (vxd) which can access any 32-bit memory address at will
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 9th, 2002, 10:26 AM
#8
There might be Win32API functions to read and write memory at any location, but Im not sure (i think i remember something like this). Take a look around the MSDN.
Z.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|