Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I know size of floppy - 3.5 or 5.25?
Message
De
14/04/1999 08:27:01
 
 
À
14/04/1999 04:13:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00208105
Message ID:
00208129
Vues:
28
>Hi, All!
>
>Is there any way to know the 'size' of the floppy drive, whether it's 3.5 or 5.25 inch?
>

If you can't find any other way, you can use the API call DeviceIOControl() to perform a IOCTL_DISK_GET_DRIVE_GEOMETRY, which returns a DISK_GEOMETRY structure; the MEDIA_TYPE member of the structure tells you the apparent drive geometry.

If there's a disk mounted in the drive, SYS(2020) will tell you the actual disk size for the mounted media; this will allow you to identify the disk type mounted (IOW, if you have a 720K disk in the drive, it'll let you know; it's particularly useful on drives like the 'superfloppy' LS-120, which can work with both standard floppy formats and the 120MB superdisks). The SYS(2020) function operates on the default drive; you'll need to SET DEFAULT TO to use it.

I'm sure that you could also use one of the Disk Information classes that can be downloaded from here on UT.

>Thanks in advance,
>
>Uri Shohet.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform