May 17, 2008

Accessing Physical Memory - Important needed for project

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

free web hosting

Accessing Physical Memory - Important needed for project

delivi
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.

Reply

switch
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

 

 

 


Reply

delivi
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.

Reply

kvkv
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : accessing physical memory needed project

  1. Executing An Exe From Within A Program! - Need help with my project (6)
  2. Need Help With Kernel Compilation - Please help me for my project (1)
    Hello everyone, i am making a project on the operating system, i am making a basic Operating
    system in C and assembly, so i have written 2 basic things boot loader and kernel Now i have a
    problem, boot loader works fine, but the kernel is not complete, it follows only very simple
    commands like clear screen, quit and reboot, i want to add program like make directory, remove
    directory, and dir commands, but i do not know the logic for those programs, please help me, and i
    also want to add a text editor and a snake game, it there a command in c that makes us to run an ex...
  3. Dynamic Memory Allocation - (2)
    I'm writing a didactic software that can store an undefined number of int in a dynamic list. I
    wrote a routine too that can delete an int and point the previous node to the next node after the
    one I've deleted. But I've a problem: If I try to delete a number that isn't in the
    list, software crashes! Why? If the routine doesn't find the number it should simply do
    nothing CODE #include <stdio.h> #include <stdlib.h> void crealista();
    void visualizzalista(); void eliminanumero(); struct elenco {   int ...
  4. Accessing Dos - i'm a newb (2)
    Hey, i'm a newbie at c++. Is there anyway to access the windows system files through a c++
    program? Kind of like running a command through dos. I could really use help here. Second
    question. How do you create a system tray icon in windows? can this be done in c++? i feel very
    dumb. please help me out....
  5. Memory Share - (0)
    Hey i looked into this and saw there were two methods: memory mapping and data_seg(built in memory
    mapping) however, being the noobie i am i can't seem to get this to work - all i want to do is
    share a few integers and bools across multiple(in this case - two) Dll's (these are injected
    into an exe) i.e 'int test' is set to '3' in first.dll -- and subsequently in
    second.dll 'test' is also set on to '3', and then i can perform if statements while
    the two values are the same over the 2 dll's...
  6. Khtml For Windows - help and support this project (0)
    The project leader has emailed me telling to post to C++ forums because they are planning to create
    KHTML for Windows. Search at sourceforge.net about it. You will find that project interesting....
  7. Free Memory After Out Of Scope? - (1)
    Hi everyone, I'm working with stl maps, I seem to be experiencing a memory leak somewhere, the
    debugger isn't giving me any warning about it though. I thought maps and other containers are
    supposed to free themselves once they fall out of scope? Code: void function1() { map >
    local_map; // insert some stuff into local_map... local_map .insert("somethin");
    local_map .insert("somethin else"); // for every key of local map, I would like to create a
    // 'minimap' that is just that one key and its associated // values. ...



Looking for accessing, physical, memory, important, needed, project

Searching Video's for accessing, physical, memory, important, needed, project
advertisement



Accessing Physical Memory - Important needed for project



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE