Windows 7 driver development environment Configuration

Source: Internet
Author: User

For detailed configuration methods, see my other article Article
Http://www.ecjtu.org/forum/read.php? Tid-21660.html
Title: Build a vista driver development environment using vs2008 pro, wdk, and ddkwizard
Author: eping
Email: eping@msn.cn
Time: 2009.12.2
Statement: some pictures of a book are still in the previous article, and the main changes are text. I will mark the modified text in red
1. Install vs2008 (Chinese Version)
Ii. Installation Visual assist (this is not necessary), but it is a rare tool during development.
3. Install wdk
For details about how to download and install wdk, see Official Link Http://download.microsoft.com/download/A/A/7/AA7A3E5E-2279-4431-B363-7EC0E3113F90/GRMWDK_EN_7600.ISO 4. Install ddkwizard The latest official version supports Windows 7
:Http://ddkwizard.assarbad.net/
The files to be downloaded include
1, Ddkwizard_setup.exe
2, Ddkbuild_bat.zip
3,Ddkbuild_mirror.zip
Install the first file Program Similarly, you only need to follow the default settings.
2 and 3 files only need to be decompressed and copied to all the root directories of our wdk.
My current directory is E: \ winddk \ 7600.16385.0

Next, we need to set the environment variable.
There are two places to set Point 2: Change the system environment variable wlhbase Variable name: w7base Variable value: e: \ winddk \ 7600.16385.0
1. Path
Add D: \ winddk to the path variable.
Otherwise, the command cannot be found during compilation.
2. Create System Variables
Variable name: wlhbase
Variable value: D: \ winddk \ 6001.18002 modify the wdk path installed for you
For example




V. Open vs2008This is the same as that in the Vista environment.
Tools --> options --> VC ++ directories in projects and solutions options
Add the root directory of wdk


All settings have been completed.

6. Write simple drivers and test our driver development environment
1. Create a project
Select empty driver in the DDK Project



Next, a dialog box of the ddkwizard Wizard will be displayed.

This is a little different from the previous version .. Select the W7 environment.

Here we can keep the default settings. I only select longhornvista wdk.
After finishing, you can start writing our driver.
For demonstration, we will not print anything but output "helloeping"
Simple driverCodeAs follows:
Note: Save it as *. C. Here I save it as test. C.

  1. # Include <ntddk. h>
  2. Void driverunload (pdriver_object driver)
  3. {
  4. Dbuplint ("helloeping \ r \ n ");
  5. }
  6. Ntstatus DriverEntry (pdriver_object driver, punicode_string reg_path)
  7. {
  8. Dbuplint ("Hello, eping! ");
  9. Driver-> driverunload = driverunload;
  10. Return STATUS_SUCCESS;
  11. }

Note: targettype = the default generated code in the sources File
You need to change to targettype = driver sources = It is empty by default. I will change it to sources = test. C to compile it successfully. Otherwise, you will find that the driver file cannot be found after the compilation is successful.
Illustration:


Driver file testdriver. sys generated on D: \ Users \ eping \ Desktop \ testdriver \ objchk_wlh_x86 \ i386


The above test is valid! Note: If you want to run the above Code on Windows 7, see

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.