Hi,

Some kind person on the net once submitted to me a very nice piece of Pascal code able (allegedly) to determine up to 30 different kinds of media. Unfortunately, I no longer know where I do have it. I wrote a small piece of code to detect 4-5 types for FreePascal some time ago, but I doubt you are interested any longer. If so, please do ask and I'll try to find that.

Aitor

Andre Tertling escribió:
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,
Andre



-------------------------------------------------------
This SF.net 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!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user



-------------------------------------------------------
This SF.net 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!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to