Re: Getting Kernel Shared section object name in Appln

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



Unless you are doing many MB/sec this approach is a terrible way to do
things. First, it is non-standard, second you have to come up with a way to
synchronize the user and kernel space code safely. Third you have to build
in a detection mechanism in case the application dies so you can clean up
things.

Consider using the inverted call mechanism, see
http://www.osronline.com/article.cfm?id=94 This is the common approach
Windows drivers, you use IOCTL's to send data from the user to the driver,
and you use one of more IOCTL's pended in the driver to notify and send data
to the user application.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"Chin" <chintin@xxxxxxxxx> wrote in message
news:1157966999.330406.102650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks, I ll have to look it other way, but do u have any suggestions
as how to open the named objects created in kernel by createfilemapping
.?

Doron Holan [MS] wrote:
once you have a shared section, what are you going to do with it? use it
to
share data between your application and a driver? if so, there are
easier
(and more documented) ways of doing this.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.


"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: When to write as a device driver instead of just a library.
    ... > one write the code as a device driver as opposed to a plain simple ... In general if it can be done in user mode, ... or major advantages to a kernel mode implementation, ... If you communicate with a device that way, ...
    (comp.os.linux.development.system)
  • Re: Communication between Ring0 and Ring3
    ... How long can the kernel mode thread safely wait for a decision to come back? ... > look to transfer the descision making code down to the driver. ... > driver to wait for the user mode app's response before it proceeds and I'm ... either allow or deny the file open request. ...
    (microsoft.public.development.device.drivers)
  • Re: HW registers shared by OAL and user-mode device driver
    ... A Kernel mode driver is a driver that is loaded by the device manager ... User mode drivers run in the lower 2GB address space in the ...
    (microsoft.public.windowsce.platbuilder)
  • Re: how to notify?
    ... of call down with an IRP that pends ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... > Share an event between user and kernel modes. ... Kernel mode sets the event> when information is available, and user mode sends a custom ...
    (microsoft.public.development.device.drivers)
  • Re: Getting Kernel Shared section object name in Appln
    ... I need to allocate memory in kernel mode, fill it and then user mode ... ZwCreateSection in kernel mode driver, then ZwCreateSection function ...
    (microsoft.public.development.device.drivers)