Re: Getting Kernel Shared section object name in Appln
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Mon, 11 Sep 2006 06:35:56 -0400
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
.
- References:
- Getting Kernel Shared section object name in Appln
- From: Chin
- Re: Getting Kernel Shared section object name in Appln
- From: Doron Holan [MS]
- Re: Getting Kernel Shared section object name in Appln
- From: Chin
- Getting Kernel Shared section object name in Appln
- Prev by Date: Re: Which is the best way for KM-UM interaction
- Next by Date: Re: NdisQueryBufferSafe returns zero buffer length when NdisQueryPacket says there is more data
- Previous by thread: Re: Getting Kernel Shared section object name in Appln
- Next by thread: Re: Getting Kernel Shared section object name in Appln
- Index(es):
Relevant Pages
|