Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Floppy disk label(s/ing)
Message
De
28/07/1999 19:07:58
 
 
À
28/07/1999 18:21:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00240547
Message ID:
00247459
Vues:
27
>Thanks for the tips, but I was already aware of those. They're fine for reading the label (as is the ADIR function Fred Taylor suggests) but they do not provide a mechanism for *writing* the label.
>
>Any thoughts?
>

You could play with the Win32 API call SetVolumeLabel(); in VFP it would be used as follows:
DECLARE INTEGER SetVolumeLabel IN KERNEL32.DLL ;
   STRING @ lpRootPathName, ;
   STRING @ lpVolumeName

IF SetVolumeLabel('A:\'+CHR(0),'MyLabel'+CHR(0)) = 1
   *  it worked
ELSE
   *  it didn't
ENDIF
Volume labels are case-insensitive; you need to specify the root path of the drive whose volume you're setting.

>-Arne
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