![]() |
Mapping foreign page into process |
Post Reply
|
| Author | |
hugo
Newbie
Joined: 20 July 2005 Location: United States Online Status: Offline Posts: 29 |
Post Options
Quote Reply
Topic: Mapping foreign page into processPosted: 03 November 2009 at 10:55am |
Did you ever get your problem sorted out?
Hugo
|
|
|
Morantex Inc.
http://www.morantex.com |
|
![]() |
|
Vernum
Newbie
Joined: 27 May 2007 Online Status: Offline Posts: 15 |
Post Options
Quote Reply
Posted: 15 September 2009 at 5:10pm |
|
That's kind of the problem. I am not the controller. :/
Hmm. But you gave me an idea. Maybe i can somehow intercept the allocation and create a section instead. Still, im not very happy with this solution. :/ |
|
![]() |
|
wj32
Senior Member
Joined: 16 January 2009 Location: Australia Online Status: Offline Posts: 704 |
Post Options
Quote Reply
Posted: 14 September 2009 at 11:04pm |
|
If you control the memory allocation, instead of using NtAllocateVirtualMemory/VirtualAlloc you should create a section using NtCreateSection/CreateFileMapping (or whatever it is) and map a view into both processes.
|
|
|
MCTS: Windows Internals
Process Hacker, a free and open source process viewer. |
|
![]() |
|
Vernum
Newbie
Joined: 27 May 2007 Online Status: Offline Posts: 15 |
Post Options
Quote Reply
Posted: 14 September 2009 at 1:13pm |
|
Well i just mean allocated regions of memory with VirtualAlloc().
( MEM_PRIVATE + MEM_COMMIT / MEM_RESERVE) I want to map one of these allocated regions into another process, simultaneously. So i can read and write to this memory-region from two process-contexts at the same time. (the processes live in the same session though) And it doesn't matter if the address-range differs. I am not really sure if there even is a "proper" way. Worst case scenario would be that i would have to manually manipulate the Page-Tables. Might this be the case here? Edited by Vernum - 14 September 2009 at 1:18pm |
|
![]() |
|
wj32
Senior Member
Joined: 16 January 2009 Location: Australia Online Status: Offline Posts: 704 |
Post Options
Quote Reply
Posted: 13 September 2009 at 11:14pm |
|
What do you mean by private page? If it was mapped from a section and you have a handle to the section, you can map a view as well. I don't think you can just convert an allocated page for use in a section, though.
|
|
|
MCTS: Windows Internals
Process Hacker, a free and open source process viewer. |
|
![]() |
|
Vernum
Newbie
Joined: 27 May 2007 Online Status: Offline Posts: 15 |
Post Options
Quote Reply
Posted: 13 September 2009 at 6:26pm |
|
Let's say one process has mapped its own private page into his virtual memory.
In my second process i want to map this exact page into my process, too. But i have no control on how the first process allocated the first page. Any ideas? |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |