sharing kernel mode and user mode memory

sharing kernel mode and user mode memory

Post by Vivek Gupt » Thu, 22 Jul 2004 18:39:33


how can I share the kernel mode memory in user mode and vice versa in a
video driver dll.
Do I need to create the memory using any particular function or so ???
 
 
 

sharing kernel mode and user mode memory

Post by Q2hyaXN0b3 » Fri, 23 Jul 2004 06:41:02

Kernel mode memory is not accessible from usermode.

You could use memory mapped files, to "share memory". Memory mapping a file can be done in a user mode application or in the kernel using the ZwCreateSection, ZwMapViewOfSection, and MmMapViewInSystemSpace operations. Subsequent access to the file contents are done using this memory mapped data region; when data must be fetched from the file it is done so.

More on this in the Platform SDK and the DDK.

/christoph

 
 
 

sharing kernel mode and user mode memory

Post by Vivek Gupt » Fri, 23 Jul 2004 21:32:56

I tried this but seems driver doesn't load in these cases ... I believe for
a video driver( a dll ) this is not permitted.



file can be done in a user mode application or in the kernel using the
ZwCreateSection, ZwMapViewOfSection, and MmMapViewInSystemSpace operations.
Subsequent access to the file contents are done using this memory mapped
data region; when data must be fetched from the file it is done so.