What is DDK and whether the driver must be written in DDK?

Source: Internet
Author: User

Prepare to start driver development in the window.

First turn an article warm up, preschool.

 

 

What is DDK and whether the driver must be written in DDK?

 

What is DDK and whether to use DDK to write to favorites?
DDK is the device development kit. If you want to develop a device driver, such as a video card driver, you must use DDK. DDK is not included in VC ++. its home page is http://www.microsoft.com/whdc/devtools/ddk/default.mspx. you can purchase msdnto renew it. You can also download kmdf (http://www.microsoft.com/whdc/driver/WDF/KMDF_pkgdwn.mspx ?), This includes the DDK of Windows Server 2003 SP1. Windows 98 DDK can be downloaded from http://download.microsoft.com/download/win98se/install/gold/w98/en-us/98ddk.exe.

Driver writing can be divided into multiple situations, which are discussed below:
1. Serial Communication.
Windows has its own serial communication API, so generally serial communication does not need to write a separate driver, you only need to call the system function. VB has the MSComm control (qa000388 "MSComm cannot transmit binary data under Windows 95"). For details about how to develop the serial number in VC, see qa000162 ", for details about Delphi, refer to qa002595 "how to control Modem in Delphi ". The vast majority of drivers for serial port external modem are A. inf file (the specification of this file is described in DDK) without the actual driver file. However, soft cats cannot use this method. If the ISDN device uses a serial port, you can also compile such a serial port file like modem (if you want to support CAPI, write the driver using the capi sdk ).
2. Use a ready-made driver package.
If your hardware is a relatively simple data acquisition card, you can also use some ready-made driver software packages that provide some basic hardware operation functions, this saves you the trouble of using DDK for development. Most of these tools support software such as Delphi, VB, and C ++ builder, which can solve the problem that these software cannot call the DDK to write the driver. See qa000335 "How to Control ports and physical addresses in VB ". Such commercial tools include ntport Library (http://china.zealsoft.com/cn/ntport/), memaccess Library (http://china.zealsoft.com/cn/memaccess/), WinDriver and so on.
3. Write with DDK
If neither of the first two cases is applicable, you need to write it using DDK. Each Windows version has a corresponding DDK. its home page is http://www.microsoft.com/whdc/devtools/ddk/default.mspx, which can only be renewed by purchasing msdn. You can also download kmdf (http://www.microsoft.com/whdc/driver/WDF/KMDF_pkgdwn.mspx ?), This includes the DDK of Windows Server 2003 SP1. Windows 98 DDK can be .. Of course, you should choose your own operating system. The main drivers of Win9x are VxD, which can be used in Win95/98/Me, but cannot be used in winnt/2000. Winnt drivers are generally. sys files. Win2000 can be compatible with winnt drivers, but it cannot be used in Win9x. If you want to support Win9x and WinNT, you need to write two types of drivers. The driver for a USB device is of the WDM type and the extension is. sys, but it can only be used in Win98/ME/2000.
Win98 DDK and Windows 2000 DDK are relatively simple to install, and it works better with VC ++, it is best to use these two DDK packages. Win95 DDK and WinNT DDK require Win32 SDK by default. If not, you need to manually modify the environment variable or setenv. bat, which is slightly troublesome and is not recommended. In addition to DDK installation, you also need VC ++ for compilation, preferably VC ++ 6.0. Other software is not required. Of course, it is best to have SoftICE as a debugging tool.
The compilation of drivers is very different from that of general programs. Therefore, we recommend that you buy this book. For more information, see qa001005 "DDK programming books ". You can also refer to qa002697 "PCI device windows universal Driver Design" for a rough idea.
In addition, there are some DDK enhancement tools, such as driverworks (http://www.numega.com/), this software compared to DDK, just like MFC and API.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/jiazhen/archive/2006/12/07/1433360.aspx

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.