Finding the address of a variable from another process

Cris

visual studio screenshot with memory window open

Hi, I wonder if someone could kindly give me some info on something please?

I have this code in exe1:

int number = 100;
int* p = &number;  // p = 0x0050f594

p is pointing to the memory address 0x0050f594

In another program, exe2, I have this:

int* p = (int*)0x0050f594;

So to me, p from exe2, points to the variable number from exe1.

I think it's something to do with different applications running in their own address space, but I would still like to know how to make exe2's p pointer point to the number variable from exe1?

Mathieu

In modern operating systems, processes are isolated. Each process have its own memory. The operating system is in charge of translating process memory address (when a process want to read or write into memory) into a physical address.

If you do not have operating system, or a simple (embedded platform) or if you're writting a kernel mode driver, you have a direct access to physical memory.

For x86 processor, the reading of https://en.wikipedia.org/wiki/Protected_mode and https://en.wikipedia.org/wiki/Real_mode may be interesting.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Finding address of variable in shared library

From Dev

Finding the memory address of a Java local variable on the Dalvik Stack from native code

From Dev

Finding heap or heap block or segment from address

From Dev

Location and region finding from the user ip address

From Dev

finding the original address of the data from a dropdown in vba

From Dev

Location and region finding from the user ip address

From Dev

Restarting a process from another process

From Dev

How can I set a global variable of a Linux process from another process?

From Dev

How can I set a global variable of a Linux process from another process?

From Dev

Process of finding sum of cells from multiple sheets

From Dev

Issue finding the process id from shell scipt

From Dev

Finding a process's filename from its PID?

From Dev

Place A Variables Address Into Another Variable In C

From Dev

How to cut broadcast ip address into another variable

From Java

Finding elements from a list included in another one

From Dev

How to trigger a process from another process in Linux?

From Dev

finding vals from table with variable keys

From Dev

Finding character index from a string variable (TSQL)

From Dev

Python __init__ finding variable from nowhere

From Dev

Swift 2 finding variable name from value

From Dev

Finding exact string from variable in an awk commmand?

From Dev

Finding closest location (selected from list) to a given address

From Dev

Windows 10 finding wifi MAC address from HDD?

From Dev

"ntpd unable to bind to wildcard address 0.0.0.0 - another process may be running"

From Dev

"ntpd unable to bind to wildcard address 0.0.0.0 - another process may be running"

From Dev

How to switch from one process to another process and kill the first process

From Dev

Is the address of a global variable guaranteed to stay the same during the process execution?

From Dev

.htaccess request to have an address served from another

From Dev

How to generate an action address from another controller?

Related Related

  1. 1

    Finding address of variable in shared library

  2. 2

    Finding the memory address of a Java local variable on the Dalvik Stack from native code

  3. 3

    Finding heap or heap block or segment from address

  4. 4

    Location and region finding from the user ip address

  5. 5

    finding the original address of the data from a dropdown in vba

  6. 6

    Location and region finding from the user ip address

  7. 7

    Restarting a process from another process

  8. 8

    How can I set a global variable of a Linux process from another process?

  9. 9

    How can I set a global variable of a Linux process from another process?

  10. 10

    Process of finding sum of cells from multiple sheets

  11. 11

    Issue finding the process id from shell scipt

  12. 12

    Finding a process's filename from its PID?

  13. 13

    Place A Variables Address Into Another Variable In C

  14. 14

    How to cut broadcast ip address into another variable

  15. 15

    Finding elements from a list included in another one

  16. 16

    How to trigger a process from another process in Linux?

  17. 17

    finding vals from table with variable keys

  18. 18

    Finding character index from a string variable (TSQL)

  19. 19

    Python __init__ finding variable from nowhere

  20. 20

    Swift 2 finding variable name from value

  21. 21

    Finding exact string from variable in an awk commmand?

  22. 22

    Finding closest location (selected from list) to a given address

  23. 23

    Windows 10 finding wifi MAC address from HDD?

  24. 24

    "ntpd unable to bind to wildcard address 0.0.0.0 - another process may be running"

  25. 25

    "ntpd unable to bind to wildcard address 0.0.0.0 - another process may be running"

  26. 26

    How to switch from one process to another process and kill the first process

  27. 27

    Is the address of a global variable guaranteed to stay the same during the process execution?

  28. 28

    .htaccess request to have an address served from another

  29. 29

    How to generate an action address from another controller?

HotTag

Archive