Get list of all available hardisks? (solved)

Just starting out? Need help? Post your questions and find answers here.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

The procedure is great and I can't see why there should be any problems with it, it doesn't check if there is any disks in the diskette stations or whatever...
I like logic, hence I dislike humans but love computers.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

ts-soft wrote:>> YOU who recommended me (and others) not to test for floppy disks
Yes, in some situations under win9x it crashes witout a floppy inserted!
maybe SetErrorMode_() will help out.

Code: Select all

SetErrorMode_(#SEM_FAILCRITICALERRORS)

For Ascii = 'A' To 'Z'
  
  Drive.s = Chr(Ascii)+":"
  If GetDriveType_(Drive) = #DRIVE_FIXED
    
    Debug Drive+" is a hard drive"
    
  EndIf
  
Next

SetErrorMode_(0)
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply