Update SmartArrayControllerTool.cpp
This commit is contained in:
parent
be117c279a
commit
3df30bbd04
@ -139,18 +139,24 @@ int wmain(int argc, wchar_t* argv[])
|
||||
sptwb.spt.Cdb[0] = 0x26;
|
||||
sptwb.spt.Cdb[6] = 0x11;
|
||||
|
||||
unsigned short bebufsize = htons(sizeof(id_ctlr));
|
||||
memcpy(&sptwb.spt.Cdb[7], &bebufsize, 2);
|
||||
const unsigned short reqSize = htons(sizeof(id_ctlr));
|
||||
memcpy(&sptwb.spt.Cdb[7], &reqSize, 2);
|
||||
|
||||
length = offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS, ucDataBuf) + sptwb.spt.DataTransferLength;
|
||||
|
||||
std::wcout << std::dec
|
||||
<< L"Total struct size: " << sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS)
|
||||
<< L", Calculated length: " << length
|
||||
<< L", Header length: " << sptwb.spt.Length
|
||||
<< std::endl;
|
||||
|
||||
BOOL ret = DeviceIoControl(
|
||||
handle,
|
||||
IOCTL_SCSI_PASS_THROUGH,
|
||||
&sptwb,
|
||||
sizeof(SCSI_PASS_THROUGH) + sptwb.spt.SenseInfoLength,
|
||||
&sptwb,
|
||||
sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS),
|
||||
length,
|
||||
&returned,
|
||||
NULL
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user