Click here to Skip to main content
15,886,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone
I use Bushound to record a SCSIP_WRITE behavior from a application. The Bushound log shows something like this.
9 CMD 2a 00 00 00 00 00 00 00 80 00 WRITE 3317238.1.0
9 CMD 2a 00 00 00 00 80 00 00 80 00 WRITE 3317239.1.0
9 CMD 2a 00 00 00 01 00 00 00 80 00 WRITE 3317240.1.0
9 CMD 2a 00 00 00 01 80 00 00 80 00 WRITE 3317241.1.0
9 OUT 03 00 00 00 03 00 00 00 04 00 00 00 03 00 00 00 05 00 00 00 03 00 00 00 06 00 00 00 03 00 00 00 ................................ 3317238.2.0
07 00 00 00 03 00 00 00 08 00 00 00 03 00 00 00 09 00 00 00 03 00 00 00 0a 00 00 00 03 00 00 00 ................................ 3317238.2.32
0b 00 00 00 03 00 00 00 0c 00 00 00 03 00 00 00 0d 00 00 00 03 00 00 00 0e 00 00 00 03 00 00 00 ................................ 3317238.2.64
0f 00 00 00 03 00 00 00 10 00 00 00 03 00 00 00 11 00 00 00 03 00 00 00 12 00 00 00 03 00 00 00 ................................ 3317238.2.96

The SCSIOP_WRITE I know is a SCSIOP_WRITE command will be followed by it's own data. But the log, 4 SCSIOP_WRITE(0x2a) in a row, shows nothing like a common SCSIOP_WRITE to me. Do someone know how to send SCSIOP_WRITE like the log does? Many thanks to your help!

What I have tried:

I try to implement IOCTL_SCSI_PASS_THROUGH_DIRECT_EX, and GetLastError returned 0x32(ERROR_NOT_SUPPORTED). STORAGE_ADAPTER_DESCRIPTOR.SrbType is really 0x00. The SrbType must be 0x01 to support IOCTL_SCSI_PASS_THROUGH_DIRECT_EX.
Posted
Updated 8-Apr-19 11:59am

1 solution

Have a look at this post : SCSI Read (10) and Write (10) with the SCSI Generic Interface - Stack Overflow[^]

There are links to other example code also there that might be helpful.
 
Share this answer
 
Comments
Member 9269298 8-Apr-19 21:42pm    
Thank you for the reply! But the example code in the link is 404 not found. I can do WRITE(10) and READ(10) to verify data. It has a limitation of MaximumTransferLength of each STORAGE_ADAPTER_DESCRIPTOR. The TRANSFER_LENGTH of WRITE(10) can not exceed the MaximumTransferLength. But the application somehow can combine 4 WRITE(10) into 1 multi-write command to the storage device(ex: SDcard). I wonder how can I transfer a "more than MaximumTransferLength data" to the storage device via SCSI command.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900