Today I have all USB

Source: Internet
Author: User

Loading Process of USB driver under CE
When a USB device is plugged into the host, there is a check thread in the USB driver module on the host, and the event is set. So after receiving the notification. at this time, the USB driver module only knows that there is a USB device connected, but does not know what class the USB is, so you need to go to the Registry to find the driver that can match the deviceProgram. (Search orderAlgorithm?)
In HKEY_LOCAL_MACHINE \ drivers \ USB \ loadclients, if this device is not connected for the first time, (yes ?) There is a note for the device driver. If this is the first time, the USB driver module fails to be searched, a dialog box is displayed, asking the user to enter the DLL name of the device driver. The USB driver then loads the DLL and calls the usbinstalldriver function. This is only installation, but also attach.
After the USB driver loads the driver DLL, it calls the USB deviceattach function of the driver. This function mainly implements the following tasks: the driver determines whether the device can be controlled. If yes, return true and accept control. If no, return false to continue searching for other drivers.

When the device is disconnected from the host, the USB driver module calls the registered callback function. Then the callback function can choose to call usbuninstalldriver (if you do not choose to call this function .... When can I choose to call it ). The USB driver never directly calls the usbuninstalldriver function. Usbuninstalldriver does the following: Delete the registry keys created in all usbinstalldriver functions and release other resources occupied by all drivers.

Of course, the USB driver here refers to the client driver.

The Universal Serial Bus (USB) host mass storage client also implements three functions required by the client DRIVER: the USB Host mass storage client driver is implemented as a USB client driver. it exposes the usbinstalldriver, usbdeviceattach, and usbuninstalldriver entry points to support plug and play functionality.

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.