How to write a driver

You will need
  • - Windows Driver Development Kit.
Instruction
Download the Windows Driver Development Kit (DDK) from microsoft.com (available for MSDN subscribers) and install it on your computer. This package contains all the necessary tools for developing and assembling drivers (compiler, linker, header files, libraries), as well as comprehensive documentation.
Study in detail all the available documentation on writing drivers for Windows. Use reference information from the DDK and the corresponding MSDN section (msdn.microsoft.com). You must fully understand all aspects of the Windows Driver Model (WDM), master the basic architectural concepts. It is necessary to clearly understand the differences betweendriversmi, working in user mode and kernel mode,driversdevices and file systems. You need to know the features of different classes of drivers, their types (bus drivers, filters, functional drivers) and subtypes (display drivers, modems, network devices, parallel and serial ports, information storage devices). Pay special attention to the principles of batch-controlled I / O (Packet-Driven I / O) with reusable request packets (Reusable IRPs),memory management, exception handling, and proper use of synchronization objects.
Clearly define the functionality of the developeddrivers. Based on this, determine which type and class it belongs to.
Select a programming language. Traditionally, kernel-mode drivers are implemented in C. User-mode drivers are usually developed in C ++. There are several exceptions to these rules. For example, client-side audio and video stream minidrivers, WDM audio miniport drivers for kernel mode, WIA drivers, and sometimes display drivers are written in C ++.
Create a project that implements the workpiece.drivers. Examine the DDK catalog with examples. Pick a demo projectdriversthe desired type. If there is no suitable example, create the files containing the necessary source code as well as build script files yourself. For example, when developingdriverskernel mode, you need to implement the DriverEntry function, which contains initialization code, as well as some standard procedures (such as AddDevice, StartIo, etc.).
Implement functionalitydrivers. Add code to the functions created in the previous step.Add I / O request processing logic, etc.


Related News


Sebozol - an effective remedy for dandruff
How to choose kitchen furniture
Oval Face Hair Cutting Board
How to ride a tractor
Pros and cons of wooden utensils
How to sew a panel