Write a simple Windows Driver

Source: Internet
Author: User
Tags microsoft website
First, go to the Microsoft website to download the DDK development kit.
:
Http://www.microsoft.com/whdc/DevTools/ddk/default.mspx

If you want to develop a driver for Windows 2003, download it.
Http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso

Create a mydirver directory in the root directory of the C drive.

Create a mydirver. C source file # Include < Ntddk. h >
Void myunload (in pdriver_object driverobject0)
{
Dbuplint ("Myunload called \ n");
}

Ntstatus DriverEntry (in pdriver_object thedriverobject,
In punicode_string theregistrypath)
{< br> dbuplint ( " I am a driver! " );
thedriverobject -> driverunload = myunload;
return STATUS_SUCCESS;
}

Create a sources file in this directory.Targetname=Mydriver
Targetpath=OBJ
Targettype=Driver
Sources=Mydriver. c

Then, create a MAKEFILE file in this directory. Similarly, the file name cannot have a Suffix in uppercase.! Include $ (ntmakeenv) \ makefile. Def

OK. Install DDK.
Start Menu \Program\ Development Kits \ Windows DDK 3790.1830 \ build environments \ Windows Server 2003 \ Windows Server 2003 checked x86 build environment. lnk

Enter the mydriver directory and enter build to build.

If no error is displayed, the driver is successfully generated.
Mydriver \ objchk_wnet_x86 \ i386 \ mydriver. sys
This is the simple driver we created.

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.