ken1234
驱动牛犊
驱动牛犊
  • 注册日期2002-07-15
  • 最后登录2002-11-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1082回复:1

这样会不会读出数据?

楼主#
更多 发布于:2002-10-28 11:53
这样会不会读出数据?
if(connectionInfo->ConnectionStatus== DeviceConnected){
hRead=hHubDevice;//hHubDevice是指向USB设备的句炳,已成功列举出port结构
ReadLen=16;
pinBuf = (char *)malloc(ReadLen);

PULONG pOut = (PULONG) poutBuf;
ULONG  numLongs = WriteLen / sizeof( ULONG );

  if (fRead && pinBuf) {
           success = ReadFile(hRead,
                         pinBuf,
                                     ReadLen,
                         &nBytesRead,
                         NULL);

MessageBox(pinBuf,NULL,MB_OK);
          



       }
         }
rayyang2000
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2012-09-13
  • 粉丝3
  • 关注0
  • 积分1036分
  • 威望925点
  • 贡献值3点
  • 好评度823点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-10-28 12:28
如果driver里面的read handler的第一句话就是:return STATUS_SUCCESS,你会读到什么?!
天天coding-debugging中----超稀饭memory dump file ======================================================== [b]Windows Device Driver Development and Consulting Service[/b] [color=blue][url]http://www.ybwork.com[/url][/color] ========================================================
游客

返回顶部