Category Archives: Windows Driver

WDM Driver Object and Device Object

Defined in wdm.h: typedef struct _DRIVER_OBJECT { CSHORT Type; CSHORT Size; PDEVICE_OBJECT DeviceObject; // link list maintained by IO manager … PDRIVER_EXTENSION DriverExtension; // AddDevice … PUNICODE_STRING HardwareDatabase; //registry key for the device … PDRIVER_STARTIO DriverStartIo; // function processes IO … Continue reading

Posted in Windows Driver |

Basic structure of WDM driver

(Notes from Oney’s book) 1. a driver is a collection of routines called by OS DriverEntry, AddDevice StartIo, AdapterControl, OnInterrupt, DpcForIsr, … DispatchPnp, DispatchPower, DispatchWmi, DispatchRead, DispatchWrite 2. A Pnp device has an electronic signature that the system can detect … Continue reading

Posted in Windows Driver |

AddDevice

responsible for creating functional device objects (FDO) or filter device objects (filter DO) for devices enumerated by the Plug and Play (PnP) manager. 1. IoCreateDevice to create a device object 2. [optional] IoRegisterDeviceInterface symbolic links to the device 3. Store … Continue reading

Posted in Windows Driver |