VC/DDK/driverworks Development Environment Configuration

Source: Internet
Author: User
Tags rar

1. Preface
Developing a Windows kernel driver is a very challenging task. You have to endure the blue screen and crashing nightmare of the operating system during the debugging process. Therefore, we strongly recommend that you use a virtual machine as a development platform, in this way, even if the entire system is crashed, it's a big deal to install a new virtual machine. Building a complete windows driver development environment is the first hurdle that everyone must go through. This article describes how to install and configure a complete DDK development replacement:
Windows XP + original Visual Studio 6.0 + winxp_ddk + DriverStudio 3.2

2. Preparations
First, uninstall the ESET (360 anti-virus software. Download and decompress the column software from the website http://www.moodisk.com/download_other_c.php:
(1w.driverstudio_3.2_cr.rar;
(2w.visual.c0000.6.en.zip;
(3w.winxp_ddk.rar;
(4w.ntstrsafe.lib+csq.lib.rar;
Decompress driverstudio_3.2_cr.rar, enter the decompressed directory driverstudio_3.2_cr, and then upload and compuware. dat. The former contains the serial number and the latter is the certificate file, which will be used during installation.

(DriverStudio 3.1: http://blog.csdn.net/mobidogs/archive/2007/01/23/1491503.aspx)

3. installation and configuration
Software installation sequence: Windows XP --> vc6.0 --> winxp_ddk-> driverstudio3.2. If the sequence is wrong, delete driverstudio3.2 and reinstall it. Find the library file ntstrsafe.lib+csq.lib.rar from the Internet, and copy the extracted two library files to the library directory under the winxp_ddk installation directory (My is C: \ winddk \ 2600 \ Lib \ wxp \ i386 ). Start vc6 and configure DDK build settings under menu DriverStudio. In the displayed dialog box, select the installed DDK directory (for example, my C: \ winddk \ 2600), select "enable only for Driver Studio" in Windows DDK compiler options ".
Vc6.0 --> Tools --> options, click the "directories" tab:
1) · select include files under "show directories for:", and then check whether the directory contains the DDK header file (my name is c: \ winddk \ 2600 \ Inc \ wxp ), add if no;
2) · under "show directories for:", select library files and check whether there are any directory of library files containing DDK (my directory is C: \ winddk \ 2600 \ Lib \ wxp \ i386), if not, add;


Note: When installing DDK, you must install the example (we recommend that you install all the modules). Otherwise, the following error will be reported when compiling vdwlibs. DSW:
Vdw_wdm.lib-1 error (s), 0 warning (s)
Open the file that caused the error and find:
# Error the file is from the DDK at SRC \ WDM \ hid \ Inc. Install DDK hid samples to install hidport. h. or update include path for hidport. h In the DDK!
This indicates that the instance is not installed when winxp_ddk is installed.

4. Compile the library files suitable for local use (the following content can be left blank if you use DDK programmers)
(1) Start vc6.0. Start --> all programs --> compuware drivestudio --> Develop --> DDK building settings, make sure that the content below "DDK root directory" is the DDK installation directory (for example, my project is C: \ winddk \ 2600), and then click "luanch program" below to officially start the development environment of vc6.
(2 ). choose file --> open workspace (open \ driverworks \ source \ vdwlibs in the driverstudio3.2 installation directory. DSW) --> go to the menu build --> batch build, and click "select x86" to select only all 32-bit libraries (my computer is 32-bit. Note: Do not select a 64-bit database for a 32-bit computer; otherwise, an error will occur in subsequent compilation.) --> click the "rebuild all" button to start compilation. (Note: I have succeeded this method once, but I have never succeeded it again. So Baidu and Google have found that the following is also true: Set vdwlibs as an activity item and select Win32 WDM checked, use build with build.exe in DriverStudio. Then select Win32 WDM free and build again. The expected vdw_wdm.lib is displayed.)
Note: errors such as file opening failure are usually caused by incorrect orientation of DDK build settings, incorrect installation sequence, or 64-bit libraries selected on 32-bit machines.

5. Compile a built-in DriverStudio instance
(1) Start vc6 and click File> open workspace to open the project file c: \ Program Files \ compuware \ DriverStudio \ driverworks \ examples \ WDM \ hellowdm. DSW, and then compile. If no error is reported, the installation and configuration are successful. But don't be too happy. The installation and configuration of the development environment is only the first step in the Great Wall. The rest is to understand the architecture of the driver module and write specific code.

6. Use driver Wizard to generate the driver framework
(1) On the vc6.0 interface, click the menu DriverStudio --> driver wizard. Then, the system will guide you step by step to complete the settings and finally automatically generate the driver framework.
(2) After the driver is set, the driver file will be generated, and then compiled with vc6.0: The build menu will be carried out. Rebuild all will generate the. SYS file, indicating that the driver module has been compiled successfully!
NOTE: If ntstrsafe cannot be enabled. the LIB error indicates that the library file is missing. Refer to the above method to complete the library file, or enter the menu project --> Settings, and click the top line in the box on the left, then ntstrsafe under "project option" on the right. lib and delete it.

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.