The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: vandenab on December 22, 2004, 03:13:39 PM

Title: moving data
Post by: vandenab on December 22, 2004, 03:13:39 PM
Well done Hutch, this new forum is really nice.

Here I am again with a question  ;). Is it possible to send, from a Ring 0 application, data (which is generated by that application), to a usual Ring 3 application ? I suppose this topic has at least once been discussed in the old forum, but I can't seem to find a corresponding thread.

If anyone is familiar with that kind of manipulation, please let me know.

Thanks a lot in advance.

Regards,

Nicolas.
Title: Re: moving data
Post by: Tedd on December 22, 2004, 04:29:07 PM
As a rough guess, there'll be problems due to access rights between ring levels.
What you could do though, is have the ring-3 program pass an address to the ring-0 one, which it then fills with junk (or whatever you want to do with it) and upon return, the application has its data.
What you have to be careful of though, is that you access the correct memory 'context' - ie. 32bit address along with the correct data segment (from the ring-3 app, not the ring-0 one!)

Alternatively, I suppose it should be possible to allocate a block of memory and return a pointer to that, but then you have to be aware of the access rights to that memory and make sure the ring-3 program can actually get to it.