Re: how to notify?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Don Burn (burn_at_stopspam.acm.org)
Date: 10/12/04


Date: Tue, 12 Oct 2004 14:51:26 -0400

Except why add all the complexity of an event shared between user mode and
kernel. Use the inverted call model, of call down with an IRP that pends
waiting for data, when the data is available fill in buffer of the IRP and
complete it. With overlapped I/O this will provide the event without all
the pain of doing it yourself in the driver.

-- 
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Benoît Bousquet" <benoit.bousquet@nospam.zzz> wrote in message
news:u7uX$tIsEHA.2904@TK2MSFTNGP15.phx.gbl...
> Share an event between user and kernel modes. Kernel mode sets the event
> when information is available, and user mode sends a custom
DeviceIoControl
> request to the driver when it sees the event as signaled.
>
> I believe I saw a nice article on www.osronline.com regarding this trick,
> and I'm pretty sure there are other equally good articles floating around.
>
> -BB
>
> "serge" <pserge77@ukr.net> wrote in message
> news:ckh8ak$2rq1$1@news.dg.net.ua...
> > Hello all,
> >
> > From time to time I want to send some data from NDIS driver to user-mode
> > application.
> > How can I do it?
> >
> > The first thing that comes up to my mind is to create a device with
> > NdisMRegisterDevice and query it in a loop from user-mode program. But
> this
> > will take some processor resources...
> >
> > Are there any other ways to receive notifications from driver?
> > What I need is a two-way pipe between driver and user-mode application.
> >
> > Thanks.
> >
> > Best regards,
> > Serge.
> >
> >
>
>


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: Getting Kernel Shared section object name in Appln
    ... synchronize the user and kernel space code safely. ... Windows drivers, you use IOCTL's to send data from the user to the driver, ... I need to allocate memory in kernel mode, fill it and then user mode ... then ZwCreateSection function ...
    (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: Communication between Ring0 and Ring3
    ... You don't call from kernel mode to user mode. ... Use an IRP and a custom IOCTL request. ... mode in your driver, then you need two irps, one to start the call, the ...
    (microsoft.public.development.device.drivers)