Driver-Driver and Driver-Application Communication
Everybody knows how an application communicates with a driver: call CreateFile to open a handle to the PDO, and use ReadFile(Ex), WriteFile(Ex) and DeviceIoControl to read data, write data or send a control code.
However, what about the opposite? How does a driver send data to an application (whenever it wants)? And how do drivers exchange data? These types of questions come very often in OSR's NTDEV list, so I found a list of resources that provide answers:
- Driver-Driver Communication
- Driver to Driver Communication: Explanation of the way that drivers exchange data between each other
- Buddy Drivers: An implementation of 2 drivers exchanging data
- Driver-Application Communication
- Peter Wieland has written this post on how the driver uses the Push or the Pull model to send data to an application
- Inverted Call Model: An implementation of Peter's model that shows how the driver sends data to the application
- Sharing memory between drivers and applications: Why, when and how?
- Sharing events between user-mode and kernel-mode
- OSR's thread on Driver-Application communication: Many driver developers write down their opinions on this issue
- Microsoft's documentation: How to use asynchronous events, in order to send data from a driver to an application
- UMDF drivers
- How an application communicates with a UMDF driver:Overview of the WDK sample that is located at %WinDDK%\src\umdf\usb\fx2_driver\final