Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Volume Information
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Get Volume Information
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00961460
Message ID:
00961460
Views:
49
Hi all,

I have been trying to retrieve the volume label information from my C: drive without success.

I am using the GetVolumeInformation API call in the following manner:
clear
declare short GetVolumeInformation in kernel32;
	string lpRootPathName,;
	string @ lpVolumeNameBuffer,;
	integer nVolumeNameSize,;
	integer @ lpVolumeSerialNumber,;
	integer @ lpMaximumComponentLength,;
	integer @ lpFlags,;
	string @ lpFileSstemNameBuffer,;
	integer nFileSystemNameSize
	
cRoot='C:'
cVolumeName=''


x=GetVolumeInformation(cRoot,cVolumeName,0,0,0,0," ",0)
? cVolumeName	
? 'Return value '
?? x
The return value is always zero indicating that the call failed, only I can't figure out what I am doing wrong. Any help would be greatly appreciated.

Thanks
Vince
Next
Reply
Map
View

Click here to load this message in the networking platform