WDM driver design environment structure

zhaozj2021-02-08  261

(Author: Su Jinguo, 2000 at 13:26 on November 9)

To develop WDM drivers, we must first install DDK (Device Driver Development Pack), the WDM development environment is relatively troubles, most developers are developing with Visual Studio, while VC has some very useful tools.

■ Installing DDK The author will detail the installation method of DDK under Windows 98, Windows NT, and Windows 95. 1. Windows 98 DDK installation This section describes how to install Windows 98 DDK. Conventions% 98DDK% is the root directory of the installed Windows 98 DDK;% mstools% is the root directory of the Microsoft SDK platform;% vcppdev% is the root exposure environment of the installed VC . Software platforms using DDK are usually Windows 98 operating systems and VC 4.2 OR version 5.0, to compile video capture, you need VC 5.0. Before installing Windows 98 DDK, you must install the VC compiler / development environment, otherwise, Windows 98 DDK's setEnv.bat batch file will not establish the correct environment. Installing DDK data requires IE 4.01 or above, if it is a CD-ROM drive from an optical disk or test driver, 16MB memory is indispensable, and the full installation requires an 82MB hard disk capacity. All examples of the driver, including Windows 98 DDK, do not need to be constructed under the installed SDK platform. However, if you start to develop your own driver, you may need not to be the header file in the Windows 98 DDK, but the header file in the SDK platform, so you can consider two methods: copy the required header file or SDK platform file In the appropriate include directory in% 98ddk% and% vcppdev%; you can also install the SDK platform directly, edit the setEnv.bat file in% 98ddk% / bin, and run the setENv.bat file installed in% mstools%. Install the DDK with the setup program, steps: (1) Run the setup.exe file in Windows 98 DDK, install Windows 98 DDK to C: / 98DDK. (2) Install VC 5.0 to C: / vcppdev. (3) Modify config.sys increasing environment variable space. In the config.sys file, finally join the line: shell = c: / windows/command.com / E: 4096 / P Before installing Windows 98 DDK, you must install the VC compiler / development environment first, otherwise, Windows 98 DDK The STENV.BAT batch file will not be able to establish a correct environment. 2. WINDOWS 95 DDK Installation WINDOWS 95 DDK Generally Need to install Win32 SDK, because Windows 95 DDK requires the 16-bit resource compiler of Win32 SDK. However, Win32 SDK is large (a full CD capacity), and it is difficult to buy in China. Here, the author introduces a simple method to install Windows 95 DDK: (1) Modify the registry, simulation Win32 SDK has been installed. Establish a registry file called Win32SDK.REG, the content is: regedit4 [hkey_users / .default / soft / microsoft / win32sdk] [HKEY_USERS / .DEFAULT / SOFTWARE / Microsoft / Win32SDK / Directories] "INSTALL DIR" = "C: // mstools "Double-click this file in the Explorer to add the contents of this file to the registry. You can install Windows 95 DDK.

(2) Run the setup.exe file in Windows 95 DDK, install Windows 95 DDK to C: / DDK. (3) Install MASM 6.11 to C: / Masm611. After the installation is complete, the file in the Masm611c directory in the un installed Windows 95 DDK will be overridden to C: / Masm611 / bin. (4) Install VC 5.0 to C: / Program Files / DevStudio / VC. (5) Establish a C: / mstools / binw16 directory, copy the resource compiler. Windows 95 DDK requires a resource compiler that can compile the source file of Win32 resources into a 16-bit resource. If there is Win32 SDK, you can copy the files in the binw16 directory to C: / mstools / binw16; if there is no Win32 SDK, you can use a third-party resource compiler, here to use Borland's resource compiler as an example: first prepare A set of Turbo Masm 5.0, unpacking the cmdline.pak file with UNPAK tools, finds the following three files: brc.exe brcc32.exe rw32core.dll copies these three files to C: / mstools / binw16, and put Brc.exe Rename Rc.exe. (6) Modify config.sys to increase environment variable space. In the config.sys file, finally join the line: Shell = C: /Windows/Command.com / E: 8192 / P 7) Enter the MS-DOS mode of Windows 95, initialize the compilation environment, it is best to build a batch file DDKSetup.bat , Content editing is: set sdkroot = c: / 95sdk call new-vars.bat (MASM611 environment) Call Ddkenv.bat (DDK environment) Call vcvars32.bat (environment) C: / masm611 / binr / new- Vars.Bat C: /DDK/ddkinit.bat 32 Base C: / Program Files / DevStudio / VC / BIN / VCVARS32.BAT You can use Windows 95 DDK, and the warning that appears when connecting. Some DDK does not have DDkenv.bat batch. If your DDK is a CD version, please pay attention to the DDkenv.bat that saves DDK, otherwise it is necessary to built. DDkenv.bat content is as follows: set ddkroot = E: / 95DDK set include =% include%;% ddkroot% / inc32;% ddkroot% / inc26 set lib =% lib%;% ddkroot% / lib has DDKENV. Batch batch, if your DDK is CD version, please pay attention to the DDkenv.bat that saves DDK, otherwise it is necessary to built. 3. NT DDK installation requires the following software: Win32 SDK or Platform SDK, NT DDK, VC 5.0. The specific installation steps are as follows: (1) Install WIN32 SDK or Platform SDK to C: / MStools.

转载请注明原文地址:https://www.9cbs.com/read-1360.html

New Post(0)