Re: Getting Kernel Shared section object name in Appln

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Chin,

To use data buffer between application and driver you can either allocate
buffer in the driver and map it to user space or allocate buffer in
application and lock it in kernel space. Either way is documented, see
MmProbeAndLockPages.

Anatoly.

"Chin" <chintin@xxxxxxxxx> wrote in message
news:1157950136.857426.78040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi ,
I need to allocate memory in kernel mode , fill it and then user mode
application has to read from it.

I have created a named section object in kernel space with the name
"\\device\\sharedmemory" using ZwCreateSection function.


But the problem is when I use the function "CreateFileMapping", with
"\\device\\sharedmemory" as its last argument, in user mode application

, it fails to open the section object already created in the kernel
mode.


If I give different name than "\\device\\sharedmemory" in
ZwCreateSection in kernel mode driver, then ZwCreateSection function
fails.


I am not able to figure out the problem .


How to access the kernel mode memory from user mode.


Please help.


Thanking You



.



Relevant Pages

  • Re: How to return required buffer size when it changes all the time?
    ... If it is too small, free it, then allocate the new one that is ... after the buffer grows above some ... The common approach is to call the driver twice; ... Suppose the app goes thru these standard motions - and the ...
    (microsoft.public.development.device.drivers)
  • Re: call user function from kernel module?
    ... >> I'll create a buffer in user space along with functions to allocate ... > 5) If MYGET, ... > In the driver: ...
    (comp.os.linux.development.system)
  • Access violation when device plugged out
    ... I have allocated using ExAllocatePoolWithTag to allocate buffer from non ... paged pool for reading data through the USB AV streaming device. ... driver to the next device object. ...
    (microsoft.public.development.device.drivers)
  • Re: Logical Address To Physical Address
    ... I'm starting developing a very simple Windows CE 5.0 driver in the ... My first question is: how can i get a physical address from a ... If you need to allocate a buffer for which you need to know both the ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Shared memory between User-Mode and Kernel-Mode??
    ... I have shared a buffer between ... you can have any generic filter driver which can create device object ... now send ioctl call from display driver to get the address of buffer ... "How To Share Memory Between User Mode and Kernel Mode" ...
    (microsoft.public.development.device.drivers)