[Solved] Writing drivers for Windows [closed]


Indeed, this would be too broad. Driver writing is a complicated thing which requires a good understanding of how a computer and the OS works. Also, C# (and .NET itself) indeed isn’t available in Kernel Mode, so C/C++ is the preferred way. Although theoretically any unmanaged language (like Pascal) could do, I haven’t heard of anyone writing drivers in them. Microsoft’s own developer resources are also written with C/C++ in mind.

Which brings us to the question of why you want to do it.

If you need it for work and there’s a deadline – forget it. Get someone else who already knows this stuff. Or there might be a library out there that fills the need. Any of these options will be cheaper than your time spent learning all this stuff.

If it’s for your own curiosity however – go for it! I’d advise by starting to learn C first. Not C++, that’s more complicated and for drivers it will be easier with C anyway. But you can pick up C++ later too, it’s good stuff. C++ is mostly compatible with C, so you can start with C and then continue with C++.

In parallel, get a good book about OS design. Not because you want to design an OS, but to understand the basic concepts that it is built upon. You should get a good understanding of things such as Kernel Mode/User Mode, virtual memory, interrupts, process scheduling, etc.

Learning a bit of assembly might be useful too (albeit not required).

Finally, when you feel like you’ve got a good grasp of the above, head over to MSDN and start reading about driver development. There will be long articles and example programs to get you started. Tweak them and play around in a virtual machine until you get what you need.

And also… read this.

solved Writing drivers for Windows [closed]