Re: Returning data in KSEVENT



In fact, the best thing to do in your situation is to use so-called
inverted call
( cttp://www.osronline.com/article.cfm?id=94), rather than using events
- it eliminates the necessity to share memory between driver and app,
which, theoretically, poses a security risk



However, if you are just desperate to do everything via events, create
unnamed synchronization (i.e. auto- reset) event in your app, pass its
handle to a driver,
and make your driver pass this handle to ObReferenceObjectByHandle() is
order to get a pointer to the underlying KEVENT. At this point app and
driver will be able to communicate with one another (in your case, to
control access to the shared buffer) - driver will be able to use
KeWaitForSingleObject() and KeSetEvent() with PKEVENT, and app will be
able to use WaitForSingleObject() and SetEvent() with a handle that
references KEVENT.....


Anton Bassov

KS wrote:
Hi,

I'm trying to return a DWORD data together with a KSEVENT in my driver so
that my user mode component will receive the data when the event is
triggered. Anyone knows how to do it? Thanks

KS

.



Relevant Pages

  • RE: NDIS60 Miniport sharing memory with user mode and WHQL
    ... In most cases sharing memory between driver an app is unreasonable - it is ...
    (microsoft.public.development.device.drivers)
  • Re: SD card and File System in WinCE 5....?
    ... Because when unload/reload SD client driver, ... So if App is running,suspend and then resume the system, if we unload and ... App will pop a message to notify user that the SD card is removed. ...
    (microsoft.public.windowsce.platbuilder)
  • [RFC] dev_acpi: device driver for userspace access to ACPI
    ... The basic concept of operation is that the ioctl operates on the ACPI ... The sample, proof-of-concept app, is called acpitree. ... You can find the driver and sample app here: ...
    (Linux-Kernel)
  • Pended IOCtrl + LoadLibrary == Deadlock?
    ... multithreaded app running on XP communicating with a software only NT ... style driver. ... this ioctrl which then makes the thread run and the command be executed. ... intact) the LoadLib is happy. ...
    (microsoft.public.development.device.drivers)
  • Re: Generic battery interface
    ... interrupts caused by apps that track kernel-issued readouts (e.g., ... > when you have a readout that was received from the hardware at time ... At time T+600 the driver receives update events (yeah, ... If this is all that happens, ...
    (Linux-Kernel)