Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Kernel Debugging | 13-17 May 2024 | Live, Online |
Developing Minifilters | 1-5 Apr 2024 | Live, Online |
Internals & Software Drivers | 11-15 Mar 2024 | Live, Online |
Writing WDF Drivers | 26 Feb - 1 Mar 2024 | Live, Online |
Comments
----------
??: Bill Casey[SMTP:[email protected]]
?????: NT Developers Interest List
??????????: 26 ??? 2000 ?. 21:09
????: NT Developers Interest List
????: [ntdev] SCSI_PASS_THROUGH
Q1: Does SCSI_PASS_THROUGH still work under Win2000?
If yes, why does this initial INQ cmd (after successfully opening
'scsi2:') fail with INCORRECT_FUNCTION?
// prepare SPTI for Inquiry command
psptdwb->sptd.Length = sizeof(SCSI_PASS_THROUGH_DIRECT);
psptdwb->sptd.PathId = 0;
psptdwb->sptd.CdbLength = CDB6GENERIC_LENGTH;
psptdwb->sptd.SenseInfoLength = 32;
psptdwb->sptd.DataIn = SCSI_IOCTL_DATA_IN;
psptdwb->sptd.DataTransferLength = sizeof(InqData);
psptdwb->sptd.TimeOutValue = 2;
psptdwb->sptd.DataBuffer = InqData;
psptdwb->sptd.SenseInfoOffset = offsetof
(SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER, ucSenseBuf);
ZeroMemory(&psptdwb->sptd.Cdb[0], 16);
psptdwb->sptd.Cdb[0] = 0x12;
psptdwb->sptd.Cdb[1] = psptdwb->sptd.Lun << 5;
psptdwb->sptd.Cdb[4] = sizeof(InqData);
length = sizeof(SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER);
status = DeviceIoControl(
fileHandle,
IOCTL_SCSI_PASS_THROUGH_DIRECT,
psptdwb,
length,
psptdwb,
length,
&returned,
FALSE
);
>>> FAILS WITH INCORRECT FUNCTION - ???
Bill Casey
---
You are currently subscribed to ntdev as: [email protected]
To unsubscribe send a blank email to $subst('Email.Unsub')
Yes is still works under windows 2000. The first thing to check
is the access level you choose when creating the handle. Windows 2000
scsi pass through must have a specific access level set. Both
GENERIC_READ and GENERIC_WRITE must be set.
> -----Original Message-----
> From: Bill Casey [SMTP:[email protected]]
> Sent: Friday, May 26, 2000 10:21 AM
> To: David Jones; Wyler Furgeson
> Subject: [ntdev] SCSI_PASS_THROUGH
>
> Q1: Does SCSI_PASS_THROUGH still work under Win2000?
>
> If yes, why does this initial INQ cmd (after successfully opening
> 'scsi2:') fail with INCORRECT_FUNCTION?
>
> // prepare SPTI for Inquiry command
> psptdwb->sptd.Length = sizeof(SCSI_PASS_THROUGH_DIRECT);
> psptdwb->sptd.PathId = 0;
> psptdwb->sptd.CdbLength = CDB6GENERIC_LENGTH;
> psptdwb->sptd.SenseInfoLength = 32;
> psptdwb->sptd.DataIn = SCSI_IOCTL_DATA_IN;
> psptdwb->sptd.DataTransferLength = sizeof(InqData);
> psptdwb->sptd.TimeOutValue = 2;
> psptdwb->sptd.DataBuffer = InqData;
> psptdwb->sptd.SenseInfoOffset = offsetof
> (SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER, ucSenseBuf);
> ZeroMemory(&psptdwb->sptd.Cdb[0], 16);
> psptdwb->sptd.Cdb[0] = 0x12;
> psptdwb->sptd.Cdb[1] = psptdwb->sptd.Lun << 5;
> psptdwb->sptd.Cdb[4] = sizeof(InqData);
>
> length = sizeof(SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER);
> status = DeviceIoControl(
> fileHandle,
> IOCTL_SCSI_PASS_THROUGH_DIRECT,
> psptdwb,
> length,
> psptdwb,
> length,
> &returned,
> FALSE
> );
>
> >>> FAILS WITH INCORRECT FUNCTION - ???
>
> Bill Casey
>
>
> ---
> You are currently subscribed to ntdev as: [email protected]
> To unsubscribe send a blank email to $subst('Email.Unsub')