关于接收USB数据的消息? [英] Messaging about receipt of USB data?

查看:66
本文介绍了关于接收USB数据的消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Windows预定义的方法来负责有关USB数据接收的消息传递吗?

预定义方法"是指我要链接到USB数据报告的事件.
USB数据报告到来时,Windows会通知我的应用程序以触发事件处理程序以从USB接收数据.
当然,我们可以启动一个线程来监视USB数据报告事件,但是我不喜欢这种方式.

I want to use windows pre-defined method responsible for messaging about receipt of USB data?

By "pre-defined method", I mean the event which I want to link to USB data report.
While USB data report come, windows will notify my application program to trigger an event handler to receive data from USB.
Of course, we can start a thread to monitor the USB data report event, but I don''t like that way.

can anyone contribute an idea about it?

推荐答案

感谢RichardM1.
HID USB设备与否无关紧要.就我而言,它是通用USB器件Microchip PIC18F46j50.我用VC ++ 6.0编写了Windows程序,该程序可以从USB读取数据或将数据写入USB.那没问题.但是我不满意我的程序,因为没有事件驱动"风格.当数据来自USB时,没有任何事件可以注意到我的程序.
这就是为什么我要使用预定义方法"来构建自己的事件处理程序的原因.
Thanks, RichardM1.
It doesn''t matter HID USB device or not. For my case, it is generic USB device, Microchip PIC18F46j50. I wrote windows program in VC++, 6.0 that can read data from USB or write data to USB. it is no problem. But I don''t satisfy my program because there is no ''event driven'' style. When the data coming from USB there is no event to notice my program.
That is why I want to use ''pre-defined method'' to build my own event handler.


查看系统挂钩.
您是否知道要寻找HID USB设备,还是对使用USB驱动器加载或写入数据时触发事件感兴趣?
Look into system hooks.
Do you know if you are looking for a HID USB device, or are you interested in getting events fired when you load or write data using a USB drive?


这篇关于关于接收USB数据的消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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