阅读:1904回复:2
为什么得不到SCSI 命令12 INQUIRY?
改的WDK上的diskperf例子,看到在
if (irpStack->MajorFunction==IRP_MJ_INTERNAL_DEVICE_CONTROL) { //DbgPrint(("liushuanglin tested for cdb ############################")); CurSrb=irpStack->Parameters.Scsi.Srb; cdb = (PCDB)CurSrb->Cdb; opCode=cdb->CDB6GENERIC.OperationCode; iqCode = cdb->CDB6INQUIRY.OperationCode; //gPrint("======================r cdb : %x\n", iqCode); if (opCode==SCSIOP_MODE_SENSE) { DbgPrint("观察:进入U盘写保护\n"); modeData = (PMODE_PARAMETER_HEADER)CurSrb->DataBuffer; if( IsReadOnly ) { DbgPrint("U盘写保护\n"); modeData->DeviceSpecificParameter |= MODE_DSP_WRITE_PROTECT; } } //liushuanglin added for capture 12 begin if(iqCode == 12 ){ DbgPrint(("---------------capture 12 code \n")); inquiryDate= (PINQUIRYDATA)CurSrb->DataBuffer; DbgPrint("---------------inquiry data device type=%d\n",inquiryDate->DeviceType); } iqCode = cdb->CDB6INQUIRY3.OperationCode; DbgPrint("@@@@@@@@@@@@@@@@@@@@@@@@@liushuanglin tested for cdb : %x\n", iqCode); //liushuanglin added for capture 12 end } 为啥得不到12,看到dbgview里面能得到25,28,0这些SCSI,为啥得不到12呢? |
|
沙发#
发布于:2010-06-15 18:39
if(iqCode == 12
--------------- 12是十六进制,十进制是18 |
|
板凳#
发布于:2010-06-15 18:51
知道,我在前面有一个
DbgPrint("======================r cdb : %x\n", iqCode); 发现根本没有12, 只有25,28,0,1a |
|