Precautions for getting started with Windows Kernel or driver programming

Source: Internet
Author: User

1. Add virtual serial ports to VMware:

\. PIPE \ com_1
This end is the server
The other end is an application

2. Add:
Multi (0) disk (0) RDISK (0) Partition (1) \ Windows = "Microsoft Windows XP Professional debug"/fastdetect/debug/debugport = COM1/baudrate = 115200

3. Set the Environment Variable _ nt_symbol_path.

The value is SRV * D: \ mysymbols * http://msdl.microsoft.com/download/symbols

4. Add the startup parameter in the parameter ...windbg.exe In the parameter format of windbg.exe:

Windbg.exe-B-K COM: Port =\\. \ PIPE \ com_1, baud = 115200, pipe

The full path of windbg.exe is in double quotation marks, and the newly added command line parameter should be out of quotation marks.

5. Run windbg after running the XP system in the virtual machine according to the general steps. Although the startup parameters of windbg are set correctly, the Windows display

Opened \. \ PIPE \ com_1
Waiting to reconnect...
Debuggee not connected.

This is because in edit virtual machine settings, check whether your serial port is Serial Port 2. If yes, the problem is here, that is, 2 more.

Disable the virtual XP system, delete the serial port, delete the printer, and add a serial port again. At this time, the serial port is called serial port. Then you can connect normally.

6 compile a common first. c demo driver

A problem is encountered here. Compilation error: wdk cannot open include file ntddk. h problem solved

This is because it is in the same folder as first. C.

The schemdes command is missing from the sources file.

The first line can be compiled by adding the pair des =$ (wdmroot); $ (ddk_inc_path.

7. Install the compiled first.syswith srvinstw.exe to the Virtual Machine XP

Before running the command, add the path of the First. sys symbol file to the windbg of the host.

Open the virtual XP command line tool and enter Net start first. Observe the windbg output of the host

Then enter net stop first. Observe the windbg output of the host.




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.