Книга: Writing Windows WDM Device Drivers
WDM Driver Installation Process
WDM Driver Installation Process
A WDM driver is installed if a new device is detected by a bus driver, or if you install a device using the Add New Hardware wizard in the Control Panel. A later section describes how the right driver is found. In both cases, the Plug and Play (PnP) Manager adds entries for the device and its driver to its configuration tables in the registry.
A driver is installed by following the instructions in an INF file. The driver executable is copied to the right location, usually the Windows System32Drivers directory. Then various registry entries have to be made.
Some devices may now need to have some system resources assigned to them, such as I/O Port addresses and interrupt numbers. The PnP Manager may need to juggle the resources that have been assigned to existing devices to make the desired resources available to the new device. If necessary, existing devices are stopped (if they agree) and their resources reassigned.
If the driver is not already present, it is loaded and its DriverEntry routine is called. The driver AddDevice routine is called for the new device. Various Plug and Play IRPs are then sent to the device as detailed in Chapter 9. This process culminates when the Start Device PnP IRP is sent to tell a driver which resources it has been assigned. The driver uses these resource assignments to start its device. Normal I/O requests can then proceed.
The INF file that was used is copied to the Windows INF subdirectory. In Windows 98, they are put in the INFOTHER subdirectory, with the INF filename changed to include the Manufacturer name. In Windows 2000, the INF file is copied to the next available OEM*.INF filename in the INF directory (e.g., OEM4.INF). If you reinstall a driver with the Have Disk option, the new INF file is copied to a new OEM*. INF file. It is probably best if you delete any out-of-date OEM*.INF files.
Please note three important points about installation.
• The driver executable must have an 8.3 filename in Windows 98.
• Windows will not use the INF file if it contains invalid section details.
• Section names must be 28 characters or less to work in W98.
If you want to install a driver that is required in the text-mode setup phase of W2000 installation, you must provide a txtsetup.oem file on a floppy disk. See the DDK for details.
- JDBC Туре 4 DRIVER
- Introduction to Microprocessors and Microcontrollers
- Installation on Red Hat 7.1
- Using the kill Command to Control Processes
- Testing Wdm2 Power Capabilities
- Test Driver Code
- CHAPTER 2 Installation
- 1. Basic microprocessor systems
- The DISPLAY Processor
- Before You Begin the Installation
- Step-by-Step Installation
- Software Selection and Installation