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.

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.

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

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.

This article has been dead for over six months. Start a new discussion instead.