Registry Changes During Driver Installation

Source: Internet
Author: User

Assume that the hardware ID is USB \ vid_aaaa & pid_bbbb \ productname

The system will generate a directory for each field in the Registry HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum. For example, if the first field in the ID is USB, a USB subdirectory will be generated under enum, if the second field is vid_aaaa & pid_bbbb, The vid_aaaa & pid_bbbb subdirectory is generated under the USB directory. If the last field is productname, The productname subdirectory is generated under the vid_aaaa & pid_bbbb directory. The information contained in the productname subdirectory is the property of the hardware and the required driver.

After the driver is installed successfully, the directory contains the following fields:

Table 1

Capabilities

Zero X 00000014

REG_DWORD

Class

Media

REG_SZ

Classguid

(Defined in the INF file)

REG_SZ

Compatibleids

USB \ class_ff & subclass_00 & port_00
USB \ class_ff & subclass_00
USB \ class_ff

Reg_multi_sz

Configflags

Zero X 00000000

REG_DWORD

Devicedesc

Mydriverdesc

REG_SZ

Driver

{Guid} \ 0042

REG_SZ

Hardwareid

USB \ vid_aaaa & pid_bbbb & rev_0100
USB \ vid_aaaa & pid_bbbb

Reg_multi_sz

Locationinformation

PIXELA-SHANGHAI

REG_SZ

MFG

Mycompany

REG_SZ

Services

DigitalTV

REG_SZ

Uinumber

Zero X 00000000

REG_DWORD

The hardwareid field, compatibleids field, devicedesc field, locationinformation field, capabilities field, and uinumber field are obtained from hardware after hardware is inserted. They are generally configured in firmware. To recognize the hardware correctly, you must manually add the class, classguid, configflags, driver, MFG, and services fields. The two important fields are the driver field and services field. The driver field contains a string pointing to another directory in the registry.

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ class \ {guid} \ 0042

The services field points to the directory.

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ DigitalTV

The HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ class \ {guid} \ 0042 directory contains various information about the driver file. After the driver is correctly installed, the following fields are found in the directory:

Table 2

Devloader

* Ntkern

REG_SZ

Driverdata

1-4-2008

REG_SZ

Driverdatadata

Rjb4bf644ec801

REG_BINARY

Driverdesc

Mydriverdesc

REG_SZ

Driverversion

6.0.0.0

REG_SZ

Infpath

Myinf. inf

REG_SZ

Infsection

DigitalTV. Dev

REG_SZ

Infsectionext

. NT

REG_SZ

Machingdeviceid

USB \ vid_aaaa & pid_bbbb

REG_SZ

Ntmpdriver

Mydriver. sys

REG_SZ

Providername

Mycompany

REG_SZ

Most fields in this table are defined in INF. machingdeviceid specifies the device ID that matches the driver and ntmpdriver specifies the driver file name.

The HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ DigitalTV directory specifies the Windows system service corresponding to the driver. The following fields are entered after the driver is correctly installed:

Table 3

Displayname

Mydrivername

REG_SZ

Errorcontrol

1

REG_DWORD

Group

Base

REG_SZ

ImagePath

System32 \ drivers \ mydriver. sys

REG_EXPAND_SZ

Start

3

REG_DWORD

Tag

0x15

REG_DWORD

Type

1

REG_DWORD

Most of the tables are also defined in INF.

Our hardware has two IDs.

USB \ vid_aaaa & pid_bbbb \ productname and

USB \ vid_aaaa & pid_bbbb \ productname2

Sometimes a board without an eeproom may also have this ID.

USB \ vid_aaaa & pid_cccc \ 5 & 111db94e & 0 & 4

Take the three IDs as an example. The HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USB directory contains two directories: vid_aaaa & pid_bbbb and vid_aaaa & pid_cccc, and vid_aaaa & pid_bbbb.

Productname and productname2 directories. Each directory has a series of fields similar to Table 1. vid_aaaa & pid_cccc has 5 & 111db94e & 0 & 4 directories, 5 & 111db94e & 0 & 4 directory also contains fields in table 1. A driver directory and a Services Directory are specified for each table. The Services Directory is generally not changed, but the matchingdeviceid field in the driver directory is associated with the hardware ID, so we need at least two Driver directory items, such

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ class \ {guid} \ 0042

And

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ class \ {guid} \ 0044

Matchingdeviceid in 0042 is

USB \ vid_aaaa & pid_bbbb,

Matchingdeviceid in 0044 is

USB \ vid_aaaa & pid_cccc.

Sometimes you also need to configure the interface (which must be configured in our driver; otherwise, DirectShow cannot use sourcefilter). You need to perform operations on some directories under HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ deviceclasses.

Many category guids are listed in the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ deviceclasses directory,

The main category in this figure has the corresponding guid in the directory.

For example, {FD0A5AF4-B41D-11d2-9C95-00C04F7971E0} represents the hardware source filters directory, the following lists a series of information similar to the hardware ID, when the hardware is inserted to obtain the hardware ID, match the corresponding items in the registry, then, the filter under this item is activated. For example, {51d771c7-c589-4b61-ad46-8c8047987a18} represents a bdacapturefilter. Some parameters are listed in device parameters and are defined in INF. After activation, you canProgramUsing bdacapturefilter.

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.