Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I format a disk
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00177270
Message ID:
00177739
Vues:
43
>Hi George,
>
>>The ability to format a drive is (or at least was) provided through a ROM BIOS interrupt call (one of the 13H functions). Windows exposes some of this functionality through the API, but not all. In general, going outside of the API to access the ROM BIOS isn't a terribly good idea, IMHO. This is what you'd have to do, I believe.
>
>MSDN says that you can use DeviceIoControl() by passing the IOCTL_DISK_FORMAT_TRACKS parameter. But that's only available in Windows NT.
>
>Christof

DeviceIoControl() does have the ability to format, but requires a fair amount of programming to use. Call me a dinosaur, but it just seems much easier to fire the command line FORMAT using CreateProcess() and redirect STDIN to respond to the inevitable prompts if you really can't live with a dialog.
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