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