Dear Mailinglist members,

I am currently working on a legacy project that needs some updating. While reviving my Turbo Pascal and Assembler skills, I stumbled across one strange thing. My Application needs to enumerate the available drives (C:, D:, etc.) and determine their types. In addition, an NTFS wrapper (ntfs4dos for example) might be loaded at this point. I found some old code in the SWAG archive that claims to be able to to this but I can't get it to work properly. Actually, it just finds my CDROM and RAM disk. :(

So how can I find

a) assigned drive letters, and
b) the corresponding drive type for each drive letter, distinguishing between local drives, network drives, cdroms and drives hosted by tools like NTFS4DOS?

a) can be solved by using the "DREADY" method. This tool from Horst Schaeffer just tries to open a file on the specified drive - probably not the best solution but short, simple and effective.

b) however gives me quite some headaches. I tried to examine the Int21h calls from the SWAG source code, but e.g. Int21h/AX=4409 always returns an error (Carry flag set), no matter whether the drive exists or not.

Any suggestions on how to solve this are most welcome :)

Best regards,

This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
Freedos-user mailing list

Reply via email to