Configuration saving trouble

Got the basic SPTI routines running. Now Saturnin can select a drive, save it by its letter, and read data from the cd inserted. The structures are now shared between ASPI and SPTI, and the drive letter is saved (instead of the id)
However there’s a problem : this technique cannot be used for ASPI, as there’s no way to map correctly windows drive letter to the internal SCSI configuration.

How does it work :


  • you get a handle to a drive by its letter (D: for example)
  • you use this handle to get the SCSI address of the drive (bus/target/lun)- and then you use ioctl to get the data configuration from the drive, using the SCSI address


  • you scan the SCSI chain, testing for each address if it’s a cdrom drive or not
  • if that’s the case you save the SCSI address of the current drive
  • you get the logical drive list from Windows and try to map it to the SCSI address

The problem with ASPI is that you don’t have a function to map the drive letter to the SCSI address … you can get a list of logical drives, but you can only guess it’s mapping. It won’t work for people changing the order of the drive letters in Windows.

Quick example :

Before modifying logical letters
Windows letterSCSI addressPosition
D: (cdrom)0/0/00
E: (dvdrom)0/1/01
F: (virtual drive)0/2/02
After modifying logical letters
Windows letterSCSI addressPosition
B: (virtual drive)0/2/00
D: (cdrom)0/0/01
E: (dvdrom)0/1/02

Using ASPI, as we only have the position in the SCSI chain, the letter mapping won’t be accurate …

I did look into FrogAspi, as it was supposed to be an ASPI replacement, and much to my regret it’s also based on ioctl, so it’s not usable on Windows 9X systems 🙁

Update : I’ve decided to get round this problem by saving the SCSI address in ASPI mode. The only drawback being that you won’t have a letter displayed in the drives list when you’re in ASPI mode …