Learning and writing WDM drivers, who is a challenging thing, requires perseverance and perseverance. When you get started, you will find that this is an exciting thing. But how do I use WDM's compilation environment to start WDM learning? This threshold can be not low for an initiator. After installing DDK, you can start the compiler with [start] -> [development kit] -> [windows xx ddk] -> [check / free build environment], because DDK does not use the IDE environment (of course you can use configuration) The following VC or DriverStudio this other is another matter), which is undoubtedly a difficult thing for our programmers who have gestated in the XP era. Why? Because compiling a WDM program except .cpp .h source files, at least it needs: makefile file Sources files These two files should be automatically generated by IDE, such as VC, generate Makefile, Sources, for all of our projects. XX.rc files, usually we don't need to understand them at all, they can compile our projects.
DDK does not have tools to generate these two files, but when the DDK compiler, it needs them. As the saying goes, "I am not as good as hell to enter the hell", we will write these two files: one .makefile (no extension Name, its name is called makefile, the content is as follows: # do not edit this file !!! Edit ./sources. If you want to add a new source # file to this component. This file merely indirects to the real make file # That is shared by all all the component $ (ntmakeenv) /makefile.def is worthy of this, all Makefile used by the WDM program, we only need to write one, copy it to the work directory when compiling Under the two. Sources files need us to modify according to different occasions, but the basic template is as follows: targetname = Driver Name // Tell the compiler connection The generated file name is "driver name" (excluding extension) TargetPath = OBJ / / fixed targettype = driver // fixed (indicated, connection to * .sys