打印机如何检查USB设备到货? [英] How to check USB device arrival is printer?

查看:108
本文介绍了打印机如何检查USB设备到货?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Windows服务,负责USB设备的到达和移除。



Plz帮帮我



我尝试了什么:



我能够找到所有的USB设备。但不是打印机。

解决方案

假设您正在使用 RegisterDeviceNotification function(Windows) [ ^ ]您可以注册特定设备类的通知(请参阅注册设备通知(Windows) [ ^ ])。



请参阅系统定义的设备供应商可用的安装类 - Windows 10硬件开发 [ ^ ]获取设备类GUID列表:

引用:

打印机

Class =打印机

ClassGuid = {4d36e979-e325-11ce-bfc1-08002be10318}

此课程包括打印机。


I have i windows service,which take care of USB devices arrival and removal.

Plz help me out

What I have tried:

I able to figure all the USB device. But NOT printers.

解决方案

Assuming you are using RegisterDeviceNotification function (Windows)[^] you can register the notification for specific device classes (see Registering for Device Notification (Windows)[^]).

See System-Defined Device Setup Classes Available to Vendors - Windows 10 hardware dev[^] for a list of device class GUIDs:

Quote:

Printers
Class = Printer
ClassGuid = {4d36e979-e325-11ce-bfc1-08002be10318}
This class includes printers.


这篇关于打印机如何检查USB设备到货?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆