views:

47

answers:

2

Hello,

I'd like to call my app from my driver when an interesting event happens in the Windows kernel. I need to be able to pass at least 4 bytes of data back to user mode. How to achieve this? These events might happen quite, but not too, often, so I don't want to build a queue system and use IOCTLs.

I was thinking of something like the driver gets loaded, the user mode app registers its callback using IOCTL and kernel keeps calling that callback when events happen and finally the user mode client unregisters the callback and no more data is send to user mode. Is this possible?

I'm new to kernel programming, so after a day of googling I decided to ask here. I've noticed that there isn't much discussion about the kernel and drivers. And even less proper docs.

+1  A: 

Microsoft published a paper about this (in MS Word format, of course), titled User-Mode Interactions: Guidelines for Kernel-Mode Drivers.

Thanks to google, here it is in HTML.

zildjohn01
Plug and Play Notifications are the kind of thing I'm looking for. As long as there's no harm sending those events out constantly. With those I can send out my own message and register my usermode app as a receiver.
Raimo Helminen
A: 

Dokan's architecture and codes might be helpful to you.

Benjamin