-

         

,


unsigned char str[0xFF];

unsigned char CDB[ATAPI_CDB_SIZE];

long a, real_len, adapterid, targetid;



// -

ASPI32Status = GetASPI32SupportInfo();

AdapterCount = (LOBYTE(LOWORD(ASPI32Status)));



// CDB-

memset(CDB, 0, ATAPI_CDB_SIZE);

CDB[0] = 0x12; // INQUIRY

CDB[4] = 0xFF; //



// ,

for (adapterid = 0; adapterid < MAX_LUN; adapterid++)

{ // ! ^^^^^^^^^^^^^ AdapterCount,

// ,

// ,

// "",

//



for (targetid = 0; targetid < MAX_ID; targetid++)

{

a = SEND_ASPI_CMD(adapterid, targetid, CDB,

ATAPI_CDB_SIZE, 0, buf, 0xFF, ASPI_DATA_IN);

if (a == SS_COMP)

{

real_len=(buf[4]>MAX_INFO_LEN)?buf[4]:MAX_INFO_LEN;

memcpy(str,&buf[8],real_len);str[real_len]=0;

printf("%d.%d <-- %s\n",adapterid, targetid, str);

}

}

}

}

,  1.4.13 ( , , SCSI-, ASPI, ; , PHILIPS IDE- 0, 1, Virtual Clone CD, , , ).

    







Forekc.ru
, , , , , , , , , ,