Scsi Pass Through Interface & Writing question

Hi Everybody,

I have a quick question regarding the SPTI interface. I am
running on NT 4.0 SP6a using Visual C++ 6.0 (sp3?).

I followed the example SPTI from the DDK, and modified the
structure’s data appropriately to read a block of data from a target
device, and everything worked the way I expected.

However, when I attempt to WRITE a block of data, the target
block is modified, but it does not contain the correct data. Is there a
special trick that I am missing, or is it simply not supported?

I read the docs and searched the KB, but I didn’t see anything
special that prohibits writing.

If anyone would be interested in viewing the code, I am working on
a basic example (which I can post) to demonstrate the problem.
Hopefully I will find the mistake myself.

Thanks,
Joe

Hi All,
A few other details that I forgot to mention:
1 - The status of the IOCTL is Success
2 - There is no “sense” information returned.
3 - The output buffer gets modified to contain the same data that is
written to the drive. Why the output data buffer would change, I have
no idea.
4 - The commands I am sending are the 10Byte Scsi Cmd versions
that are supported by my drive (Seagate FC).

Thanks,
Joe

Hi Everybody,

I found my problem. Thanks to further research of the mailing list.

Since the Write operation I was attempting was the first OUTPUT
operation I attempted, I needed to change the DeviceIoControl input
length parameter from “sizeof(SCSI_PASS_THROUGH)” to include the
size of the data buffer I was attempting to write.

Anyway… Thanks,
Joe