This is a set of loaded questions, with almost but not quite enough
information.
If you want to see what is happening, just get a software bus analyzer.
The two most common ones(*) I’ve seend are BusTrace (www.bustrace.com)
and BusHound (www.bushound.com). Both are commercial products, but cost
less than writing one yourself by a lot.
If you want to do something else, please let us know why you’d want to
“monitor” read/writes. Do you want to collate writes, fail writes,
validate the data is correct, other? There are lots of edge cases in
all the above scenarios.
ASPI is (was) produced by Adaptec as a method of sending commands to a
SCSI device. This API was later extended to support many other bus
types on Windows.
IMAPI is the CD recording functionality in Windows XP / Server 2003. It
has a COM interface at the upper layer (IMAPI.EXE running as a service),
and uses a lower filter driver as well.
To say that “writing is done through the SCSI bus” is not quite correct.
CD media is rather peculiar (relative to HDD) in that if the media is
formatted certain ways (i.e. packet written) a write of one sector
actually will destroy other sectors on the media (i.e. the other
sectors in the packet). So, CDROM.SYS only enabled normal writing for
media which acts like a HDD (sector-addressable writes, randomly
writable, defect management).
IMAPI does not use a live file system, it uses a process commonly
referred to as “mastering”. That is to say that an image of the
contents to be written is created, and then the entirety of that image
is sent to the CD drive in one continuous write operation. The related
commands to do this are sent via the standard ioctl
IOCTL_SCSI_PASS_THROUGH_DIRECT, which is handled by the port driver.
Please let us know what you are trying to do, as well as the target
environment (just yourself, internal tool, or released product) for your
resulting work.
Hth,
.
(*) Of course, this should not be read as an endorsement of any kind by
Microsoft, etc.
-----Original Message-----
From: Omer B [mailto:xxxxx@gmail.com]
Sent: Monday, March 14, 2005 9:51 AM
Subject: Monitor CDROM read/write operations using filter driver
Hello
I want to monitor read and write operations from CDROM (on win xp and
2000).
From what I’ve read so far, I understand that I need an upper filter
driver over scsiport.sys, and to monitor writing for example I need to
check for IOCTL_SCSI_PASS_THROUGH.
Is this correct? Any guidance on how to do it?
Does this method monitor writing from all burning programs?
Can anyone supply me with information about ASPI, IMAPI and why CD
writing is done through the SCSI bus and not through the cdrom driver?
Thanks