abc13271552
驱动小牛
驱动小牛
  • 注册日期2007-08-13
  • 最后登录2023-12-05
  • 粉丝0
  • 关注0
  • 积分34分
  • 威望552点
  • 贡献值0点
  • 好评度160点
  • 原创分0分
  • 专家分0分
  • 社区居民
阅读:689回复:0

读取的数据在哪,(下面这句话如何理解)

楼主#
更多 发布于:2007-08-27 14:01
4:具体的读的数据在那里呢?  
  Depending   on   whether   the   underlying   device   driver   sets   up   the   target   device   object's   Flags   with   DO_BUFFERED_IO   or   with   DO_DIRECT_IO,   data   is   transferred   into   one   of   the   following:    
  ·The   buffer   at   Irp->AssociatedIrp.SystemBuffer   if   the   driver   uses   buffered   I/O    
  ·The   buffer   described   by   the   MDL   at   Irp->MdlAddress   if   the   underlying   device   driver   uses   direct   I/O   (DMA   or   PIO)    
  Volume设备出现DO_BUFFERED的情况几乎没有,所以DO_DIRECT_IO表示数据应该返回到  
  Irp->MdlAddress所指向的MDL所指向的内存.在无标记的情况下,表明数据读好,请返回到    
  Irp->UseBuffer中即可.Irp->UseBuffer是一个只在当前线程上下文才有效的地址.如果在前面设置的完成例程,和原来的线程不是在一个上下文中的,所以在完成例程序中得到的该地址是不正确的。要么只能从Irp->MdlAddress中得到数据,如果想要回到当前线程上下文,那么就使用前面的方法,通过等待EVENT的方法。
驱网无线,快乐无限
游客

返回顶部