Re: Returning data in KSEVENT
- From: soviet_bloke@xxxxxxxxxxx
- Date: 3 Jan 2007 16:59:54 -0800
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
.
- References:
- Returning data in KSEVENT
- From: KS
- Returning data in KSEVENT
- Prev by Date: Re: DDK calls from application
- Next by Date: Re: Okay, what's really up with remove locks?
- Previous by thread: Re: Returning data in KSEVENT
- Next by thread: Developing a "virtual" joystick driver...
- Index(es):
Relevant Pages
|