Windows API Device Driver Management and kernel Communication

Source: Internet
Author: User

For more information about the driver and kernel, see [2. Here is a brief description.

ApplicationProgramYou can add the device driver to the kernel. You can send a request to a device driver that has been loaded, control the request, or communicate with the kernel program to transmit data.

Device management [1]

List Devices

The setupdicreatedeviceinfolist function creates an empty list of device information.

The setupdigetclassdevsex function obtains the information list of all devices of the specified guid type.

The setupdienumdevieeinterfaces function obtains information from the list of acquired device interfaces and saves the information using the structure. Each call will return information of one device interface in turn.

The setupdienumdeviceinterfaces function does not provide sufficient information. It is used as a parameter and passed to functions such as setupdigetdeviceregistryproperty and setupdigetdeviceinterfacedetail to obtain the details of device interface information.

The memory allocated by setupdicreatedeviceinfolist must be released through the setup di destroydeviceinfolist function.

Monitor Device loading and unloading

Register "device notification" and use the API function registerdevicenotification

If a driver needs to communicate with the user State program, you need to create a device object and a symbolic link. The created symbolic link corresponds to the device name opened by the user-mode driver controller using createfile.

Create a device object and a symbolic connection using the iocreatedevice and iocreatesymboliclink functions.

Reference

[1] proficient in Windows API functions, interfaces, and programming instances

[2]Http://www.cnblogs.com/mydomain/category/264964.html

Related Article

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.