DDK & WDM learning-manual compilation steps and related settings of helloddk

Source: Internet
Author: User

1. Install wdk and start the compiling environment. Checked is used for debugging equivalent to debug in VC. Free is used for release and official use is equivalent to release in VC.

 

Note * configure the width of the command line window-1, Registry "HKEY_CURRENT_USER/console/screenbuffersize" or 2, CMD window "properties-> Layout-> screen buffer size"

* View environment variables-Enter "set" in the command line, with no parameters

 

2. Description of the configuration file makefile, sources, and dirs

Makefile:

# Makefile <br/> # Do not edit this file !!! Edit. /sources. if you want to add a new source <br/> # file to this component. this file merely indirects to the real make file <br/> # that is shared by all the driver components of the Windows nt ddk <br/> # <br/>! Include $ (ntmakeenv)/makefile. Def 

Note * ntmakeenv can be found in environment variables. For example: ntmakeenv = C:/winddk/7600.16385.1/bin

 

Sources:

Targetname = helloddk <br/> targettype = driver <br/> targetpath = OBJ <br/> supported des = $ (basedir)/INC;/<br/> $ (basedir) /INC/DDK;/<br/> sources = driver. CPP/ 

Note * targettype = driver indicates that the driver is compiled, and targettype = program indicates that the Win32 program is compiled.

Sources only needs to contain the. c/. cpp file, not the header file

 

Dirs:

D: /winddk/7600.16385.1/src> type dirs <br/> dirs =/<br/> 1394/<br/> audio/<br/> avstream/<br/> biometrics/ <br/> BTH/<br/> filesys/<br/> General/<br/> hid/<br/> input/<br/> ir/<br/> mmedia/<br/> network/<br/> Print/<br/> SD/<br/> sensorsandlocation/<br/> serial/<br/> Setup/<br /> sideshow/<br/> smartcrd/<br/> storage/<br/> swtuner/<br/> test/<br/> USB/<br/> video/ <br/> videocap/<br/> WIA/<br/> WMI/<br/> WPD 

Note * this file indicates the directories to be compiled in sequence.

 

3. Use build.exe to compile the code

 

4. Virtual PC

Settings

COM1-Named Pipe-//./pipe/com_1

 

Windows XP SP3, Boot. ini

 

[Boot loader]

Timeout = 30

Default = multi (0) disk (0) RDISK (0) Partition (1)/Windows

[Operating systems]

Multi (0) disk (0) RDISK (0) Partition (1)/Windows = "Microsoft Windows XP Professional"/noexecute = optin/fastdetect

Multi (0) disk (0) RDISK (0) Partition (1) /Windows = "Microsoft Windows XP Professional"/noexecute = optin/fastdetect/debug/debugport = COM1/baudrate = 115200

 

 

Note * serial numbers in red should be consistent

 

5, windbg

Shortcut-Target

Eg: C:/winddk/7600.16385.1/debuggers/windbg.exe-y c:/localsymbols; SRV * C:/localsymbols * http://msdl.microsoft.com/download/symbols-k com: pipe, Port = //. /pipe/com_1-Q

 

Note * the names of the named MPs queues must be consistent in the blue font.

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.