Map System Space to Process Space?

Map System Space to Process Space?

Post by danorto » Sun, 13 Feb 2005 00:04:20


I'm calling another driver that allocates and returns a locked memory
buffer as an MDL. (The memory buffer is not device memory, but out of
main memory and it's not necessarily contiguous.)

How can I map that memory into a process?

Thanks.
 
 
 

Map System Space to Process Space?

Post by danorto » Sun, 13 Feb 2005 00:15:42

I think I can answer my own question. I call
MmMapLockedPagesSpecifyCache() the with MDL. The trick not documented
by Microsoft is that the memory address returned by that function is
the process virtual address of the current user process. Thanks to OSR
for this one:

http://www.yqcomputer.com/