Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6: API to clear label error handling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
VFP6: API to clear label error handling
Divers
Thread ID:
00686532
Message ID:
00686532
Vues:
106
I am trying to use this code to clear the volume label on a disk. I can not get the error handler (GetLastError) to work. If I try run this code with no disk in the drive the SetVolumeLabel still returns a 1. I am using Win98 and received the code from:
http://www.news2news.com/vfp/?example=151&function=221#codeexamples

DECLARE INTEGER GetLastError IN kernel32

DECLARE INTEGER SetVolumeLabel IN kernel32;
STRING lpRootPathName, STRING lpVolumeName

IF SetVolumeLabel ("A:\", "") = 0
* 3 = The system cannot find the path specified
* 5 = Access is denied
* 21 = The device is not ready
* 1235 = The request was aborted
? "Error code:", GetLastError()
ENDIF

Thanks!
DLC
"Use the Right Tool for the Job!"
davidandcynthia@email.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform