您的位置:程序门 -> 硬件/嵌入开发 -> 驱动开发/核心开发



如何将读取数据改为异步读取


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何将读取数据改为异步读取
发表于:2008-01-12 10:22:28 楼主
我用hidlib库做了个读取usb   hid设备的vc6程序.   同步读取数据好像经常死机.  
unsigned   long   lpnumberofbytesread=0;
unsigned   char   buffer[receive_no],   display[receive_no*3+1];
cstring   f1;
if(readfile(
devicehandle[indexinfieldlist],                                 //   handle   of   file   to   read
buffer,   //   pointer   to   buffer   that   receives   data
48, //   number   of   bytes   to   read
&lpnumberofbytesread, //   pointer   to   number   of   bytes   read   //从第一个字节开始读接收到的数据.
null //   pointer   to   structure   for   data
))
如何将读取数据改为异步读取.

发表于:2008-01-12 16:33:431楼 得分:0
该回复于2008-01-14 09:20:41被版主删除


快速检索

最新资讯
热门点击