It's hard to write kernel mode drivers. Real hard. In fact, it's hard to believe how hard it is. Well, the Windows Driver People have been working tirelessly to make it a little less hard (not easy) to write kernel mode drivers that won't hose your system. You know, blue screen of death and the like. If you write kernel mode drivers you really should watch this video. You will be impressed with the work that has gone into the Kernel Mode Driver Framework. This framework abstracts some of the pain points away for driver developers giving them the freedom to concentrate on their algorithms related to device usability...
Find out more about KMDF and related technologies (and get the bits!)
KMDF Blog: https://blogs.msdn.com/doronh/
KMDF homepage: https://www.microsoft.com/whdc/driver/wdf/KMDF.mspx
KMDF bits (v1.1 right now): https://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx
WDF: (UMDF, verification tools): https://www.microsoft.com/whdc/driver/wdf/default.mspx