Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning Drive Information
Message
De
06/02/1999 01:35:30
 
 
À
05/02/1999 18:08:36
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00184270
Message ID:
00184655
Vues:
17
>>The GetLogicalDriveStrings function will only return a list of drives available. You will next need to use GetDriveType function, again in Win32API to identify the type of drive. If it returns DRIVE_CDROM, you then have the drive letter of the CDROM. It may be quicker just to scan drives A to Z with this function - need to manually test to see if error occurs on non existent drive. Then stop when you find CD.
>
>Not necessarily stop - I've managed once to add a disk and have the CD as the non-last drive. Don't remember how I did it, but I think the letter was reserved for a inaccessible network mapping, and then the CD just took that letter. I know it was something unexpected - and yet having the CD as the last drive is just a default, not a mandatory thing. So he better check all available drives if it's not only the CD he's looking for.

It's easy under NT, where Disk Administrator lets you shift drive letter assignments all over creation, and if you have removable media drives like the Zip or Syquest stuff that set the drive letter up in the AUTOEXEC.BAT under Win9x, the removable drive letter is added after the CD in many cases, which is a native protected-mode device.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform