Re: Kernel mode to user mode



Don Burn wrote:
Don't waste your time with an event. Use an inverted call
http://www.osronline.com/article.cfm?id=94. Basically, you have you
application pass one or more IOCTL's to the driver which pends them till it
wants to notify the app, then it competes them. Using an event has a ton of
problems.

I would respectfully disagree. You have to provide a way to cancel an
IOCTL when various things happen (including PNP events), and
synchronization is a nightmare. Managing an event object is child's play
in comparison, provided that you do the right things with the KEVENT
instead of just using the user-mode handle willy-nilly.

The OP's problem may be that he's doing a non-alertable kernel-mode wait
for the user-mode application to respond. It would be far better to have
the application send an IOCTL (which doesn't get pended). Next best
would be to do an alertable user-mode wait.

--
Walter Oney, Consulting and Training
http://www.oneysoft.com
.


Loading