dge
dge
驱动牛犊
驱动牛犊
  • 注册日期2006-05-01
  • 最后登录2009-05-21
  • 粉丝0
  • 关注0
  • 积分410分
  • 威望45点
  • 贡献值0点
  • 好评度44点
  • 原创分0分
  • 专家分0分
阅读:5495回复:0

发送IRP_MN_QUERY_DIRECTORY枚举文件出问错,请大侠帮忙

楼主#
更多 发布于:2007-02-15 17:03
  invoke   ExAllocatePool,NonPagedPool,(sizeof FILE_DIRECTORY_INFORMATION)*200        
            mov     [esi].UserBuffer,eax
            lea     eax, event
            mov     [esi].UserEvent,eax
            lea     eax,ioStatus
            mov     [esi].UserIosb,eax
            push   lpFileobject
            pop     [esi].Tail.Overlay.OriginalFileObject
            invoke   KeGetCurrentThread
            mov     [esi].Tail.Overlay.Thread,eax
              mov     [esi].RequestorMode,KernelMode
            assume   esi:nothing
  
              IoGetNextIrpStackLocation pIrp
              mov     irpSp,eax
            mov     esi,eax
            assume   esi:ptr IO_STACK_LOCATION

            mov     [esi].MajorFunction,IRP_MJ_DIRECTORY_CONTROL
            mov     [esi].MinorFunction,IRP_MN_QUERY_DIRECTORY
            mov     [esi].Flags,SL_RESTART_SCAN or SL_RETURN_SINGLE_ENTRY
            mov     [esi].Control,0
            push     lpDeviceObject
            pop     [esi].DeviceObject
            push     lpFileobject
            pop     [esi].FileObject
            mov     [esi].Parameters.QueryDirectory._Length,200*(sizeof FILE_DIRECTORY_INFORMATION)
            mov     [esi].Parameters.QueryDirectory.FileInformationClass,FileDirectoryInformation
              mov     [esi].Parameters.QueryDirectory.FileIndex,0
            lea     eax,aFileName
            mov     [esi].Parameters.QueryDirectory.FileName,eax
在IoCallDriver中出错,有哪位大侠知道,请指教.
相信自己
游客

返回顶部