Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Accessing Physical Memory, Important needed for project
delivi
post Jan 26 2006, 09:37 PM
Post #1


Trap Grand Marshal Member
***********

Group: [HOSTED]
Posts: 1,300
Joined: 11-January 06
From: Chennai, India
Member No.: 16,932



Is there a way to access the contents of the physical memory from an application .

please give details about the corresponding functions and libraries or apis to be used.

I need this for my personal project.
Go to the top of the page
 
+Quote Post
switch
post Jan 29 2006, 05:55 AM
Post #2


Premium Member
********

Group: Members
Posts: 178
Joined: 13-October 04
From: NSW, Australia
Member No.: 1,713



yep, you use a wonderful thing called pointers. Pretty much 'pointers' point to a memory location. So if you set a pointer as '0' it will point to memory location 0. if you set it to '14' it will point to location 14. this way, you can simply scan through memory by incrementing the pointer. I assume you're using C++, so, to declare a pointer:

CODE
int *myPointer;

This makes a new pointer titled myPointer that can only point to ints.

then, to change the address that a pointer pointers to:
CODE
myPointer = myPointer + whatever;

This adds whatever to the address number of myPointer.

then, to access the data in the pointer:

CODE
data = *myPointer;

This extracts the information from the memory location that myPointer is pointing to.

If you're still confused, sorry I didn't explain it better. Also, there's heaps of information around on the web. Just search for "C++ pointers" or something and you'll find loads of simpler tutorials.
Cheers. biggrin.gif
Go to the top of the page
 
+Quote Post
delivi
post Jan 29 2006, 10:45 AM
Post #3


Trap Grand Marshal Member
***********

Group: [HOSTED]
Posts: 1,300
Joined: 11-January 06
From: Chennai, India
Member No.: 16,932



Thanks switch,

Actually I want to access the entire physical memory and store it as a file, i am want to create a program like the hibernate functionality in windows XP. So please kindly help me.
Go to the top of the page
 
+Quote Post
kvkv
post Jan 30 2006, 12:54 AM
Post #4


Newbie [Level 3]
***

Group: Members
Posts: 40
Joined: 29-January 06
Member No.: 17,841



QUOTE(delivi @ Jan 29 2006, 06:45 AM)
Thanks switch,

Actually I want to access the entire physical memory and store it as a file, i am want to create a program like the hibernate functionality in windows XP. So please kindly help me.
*



I don't think it is possible unless it is built into operating system. Any good OS (I don't even consider DOS a OS) will protect the memory access by bounding it within the allocated logical block. If you try to access memory which is not allocated to your program, it will be terminated by your os.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Memory Share(0)
  2. Accessing Dos(2)
  3. Dynamic Memory Allocation(2)
  4. Need Help With Kernel Compilation(1)
  5. Executing An Exe From Within A Program!(7)


 



- Lo-Fi Version Time is now: 26th July 2008 - 06:51 AM