Home > other >  Windows 7 32-bit operating system applied Adaptec ASPI tape machine programming problem
Windows 7 32-bit operating system applied Adaptec ASPI tape machine programming problem

Time:10-06

I under Windows 7 32 bit operating system application Adaptec ASPI tape machine programming, when asked whether the tape machine ready, the program does not response, has been waiting for, namely ss_penging, and the same other commercial software, is to use bcb6, application of Adaptec ASPI writing can be normal use, shows that fiber card driver and the ASPI itself should be no problem, I of the program in some Windows 7 32-bit operating system of the machine can be normal use, under some machines here no, don't know what's wrong, the code is as follows:

Is_ready (int iunit, int scsi_id, int haidt)
{

Int srb_len=sizeof (SRB_ex);

SRB_ex. SRB_HaId=haidt;
SRB_ex. SRB_SenseLen=44;
SRB_ex. SRB_CDBLen=6;

SRB_ex. SRB_Cmd=SC_EXEC_SCSI_CMD;
SRB_ex. SRB_Flags=SRB_DIR_IN;
SRB_ex. SRB_Target=scsi_id;

SRB_ex. CDBByte [0]=0;
SRB_ex. CDBByte [1]=scsi_id & lt; <5;

DWORD ASPIStatus;
ASPIStatus=SendEx ((LPSRBEX) & amp; SRB_ex);

While (SRB_ex. SRB_Status==0)
{
}

If (SRB_ex SRB_Status!=1) return SRB_ex. SRB_Status;
return 0;
}

Program has been the local loop
While (SRB_ex. SRB_Status==0)
{
}

Please experts to give directions, thank you!
  • Related