摘要: USB Composite Class DevicesA USB Composite Device is any device which does more than one jobfor example a combined keyboard and mouse.A USB Composite device is the one with multiple interfaces controlled independently of each other. When using such device multiple functions are combined into a singl 阅读全文
posted @ 2013-04-19 15:41 IAmAProgrammer 阅读(2406) 评论(0) 推荐(0) 编辑
摘要: http://www.cppblog.com/Lee7/archive/2008/01/07/40650.htmlOverlapped I/O简述:Overlapped I/O也称Asynchronous I/O,异步I/O模型。异步I/O和同步I/O不同,同步I/O时,程序被挂起,一直到I/O处理完,程序才能获得控制。异步I/O,调用一个函数告诉 OS,进行I/O操作,不等I/O结束就立即返回,继续程序执行,操作系统完成I/O之后,通知消息给你。Overlapped I/O只是一种模型,它可以由内核对象(hand),事件内核对象(hEvent), 异步过程调用(apcs) 和完成端口(I/O 阅读全文
posted @ 2013-04-19 15:21 IAmAProgrammer 阅读(811) 评论(0) 推荐(0) 编辑
摘要: 应用程序和驱动程序的通信过程是:应用程序使用CreateFile函数打开设备,然后用DeviceIoControl与驱动程序进行通信,包括读和写两种操作。还可以用ReadFile读数据用WriteFile写数据。操作完毕时用CloseHandle关闭设备。我们比较常用的就是用DeviceIoControl对设备进行读写操作。CreateFile这是一个多功能的函数,可打开或创建以下对象,并返回可访问的句柄:控制台,通信资源,目录(只读打开),磁盘驱动器,文件,邮槽,管道。HANDLE WINAPI CreateFile( _In_ LPCTSTR lpFileName, _In_ ... 阅读全文
posted @ 2013-04-19 13:53 IAmAProgrammer 阅读(4188) 评论(0) 推荐(1) 编辑
摘要: Standard DescriptorsADevice Descriptordescribes general information about a USB device. It includes information that applies globally to the device and all of the device's configurations. A USB device has only one device descriptor.TheConfiguration Descriptorgives information about a specific de 阅读全文
posted @ 2013-04-19 10:09 IAmAProgrammer 阅读(2030) 评论(0) 推荐(0) 编辑