Message 4 of 7
11 Apr 18 14:02
Join Date: 28 Jan 2005
Posts To This List: 500
evtioread and evtiowrite isn't call
email@example.com windbg"@lists.osr.com wrote:
> Hello. I used this article http://www.osronline.com/article.cfm?article=446 to
create a driver filter for usb flash. Installed this driver as the upper filter
driver. In windbg, when debugging, the breakpoints in the ioread and oiwrite
events do not call when I try to read or write data to the device. The
breakpoints on the device addition and retrieval events are triggered. What
could be the problem?
> The driver is installed for devices in the stack along this path:
> HLM\System\CurrentControlSet\Enum\USB. The example uses
> EvtIoDeviceControl and EvtIoInternalDeviceControl. The breakpoint is
> triggered by EvtIoInternalDeviceControl.
What is the overall goal you are hoping to accomplish?Â From your
message, I'm guessing you don't really understand how drivers are
stacked in Windows.
Writing to a USB flash drive involves 6 or more drivers.Â Each one has
its own interfaces in and out, and you need to know where you have to be
to get the information you want.Â When you do a WriteFile to a USB flash
device, that request goes to a file system driver, and that file system
driver sees it as an IRP_MJ_WRITE request, which would go to an
EvtIoWrite handler.Â That file system driver converts the write into
partition-relative requests, and sends to a volume driver.Â That driver
converts the write to disk-relative request, which it sends to a disk
driver.Â In this case, that is disk.sys (in the ENUM\USBSTOR tree).Â
That driver talks to the storage driver, which is usbstor.sys.Â That's
the driver in Enum\USB.Â That driver sends USB requests (URBs) to
usbhub,sys, which talks to the host controller driver.
Below that very top level, almost all inter-driver communication is done
via ioctls or internal ioctls.Â It's quite possible that, by the time
you get to usbstor.sys where your filter driver lives, all of the
requests have been turned into IRP_MJ_SCSI, which is the same as
So, tell us what you want to learn, and someone here can guide you on
where to filter.
Tim Roberts, firstname.lastname@example.org
Providenza & Boekelheide, Inc.