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.