Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6: API to clear label error handling
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00686532
Message ID:
00686537
Views:
37
You could ask directly the author, Anatoliy Mogylevets
devicecontext@msn.com, or just add comment on the mentioned site.



>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!
Previous
Reply
Map
View

Click here to load this message in the networking platform