954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Some thoughts

I've been having some thought, like, if I run a program, and I'm exporting a pointer to a variable "a" to a file, and I reads that information with another program, wouldn't the second program be able to modify "a" in the first program using that pointer? - Like the memory address is the same right?

And then I need some help, is it possible, for me, to write some code lines in a text file, and like make the program load and execute these lines from the file? - if I got a program, and I need to do a lot of testing in a specific sector or something, is it possible? - I know it's possible with shaders.

Skeen
Junior Poster in Training
77 posts since Nov 2009
Reputation Points: 10
Solved Threads: 2
 
I've been having some thought, like, if I run a program, and I'm exporting a pointer to a variable "a" to a file, and I reads that information with another program, wouldn't the second program be able to modify "a" in the first program using that pointer? - Like the memory address is the same right?

Any addresses you obtain are not real addresses but rather virtual addresses. In terms of real hardware addresses, i.e., physical addresses, only Windows itself deals with them. It isn't like back in the old DOS world where you could actually deal with hardware.

There are ways to share data between processes, but writing a virtual address to a file and reading it with another program isn't one of them.

Frederick2
Posting Whiz
330 posts since Jul 2008
Reputation Points: 244
Solved Threads: 31
 

Any addresses you obtain are not real addresses but rather virtual addresses. In terms of real hardware addresses, i.e., physical addresses, only Windows itself deals with them. It isn't like back in the old DOS world where you could actually deal with hardware.

There are ways to share data between processes, but writing a virtual address to a file and reading it with another program isn't one of them.

So you're saying that I'm unable to use my pointer in another program, even tho it isn't released by the main program yet (still running). - Like, what would that pointer, point to then? - if I call it's value in the second program.

And I know that there are ways, it was just 'Some thoughts'.

Skeen
Junior Poster in Training
77 posts since Nov 2009
Reputation Points: 10
Solved Threads: 2
 
Like, what would that pointer, point to then? - if I call it's value in the second program.

More than likely some address not valid in the second program. If you want to try it go ahead - it shouldn't be that hard to do. I'm telling you what I am from my study of these things, plus I've seen this topic come up occasionally in other forums. If somebody else knows better, please jump in and correct me. My understanding of this issue is that Windows completely virtualizes hardware, and only within the deepest recesses (and not available to us) of the kernel is the actual mapping of the various processes's virtual addresses to physical hardware addresses.

Frederick2
Posting Whiz
330 posts since Jul 2008
Reputation Points: 244
Solved Threads: 31
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You