Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getvolumeinformation() bug?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00400090
Message ID:
00400315
Views:
14
>>When I use the function GETVOLUMEINFORMATION() of the KERNEL32.DLL, it returns an integer number on the 4th parameter that gives-me the drives serial number in integer format. Translated to hexa-decimal, this number is equal of the number displayed on a command prompt window with the command LABEL or DIR.
>>
>>A strange behavior has ocurred: when I run this function on a computer that has partitions on HD (windows / linux), it returns other value on drives serial number, different that obtained on command prompt.
>>
>>Someone could give-me a idea of how to obtain always the same number that the commands DIR or LABEL display?
>>
>>Really thanks for any replay.
>
>Like Barbara, I haven't seen this. However, I would be interested to see if the same sort of thing results when using the Windows Script Host's FileSystemObject:
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>oDrive = oFSO.GetDrive("C")
>? oDrive.SerialNumber
The WSH is an optional component of Win98 and part of Win2K. It is also downloadable and re-distributable from Microsoft. Unfortunately, I don't know the URL off the top of my head.

I do - see the .sig block... ;-)
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform