Karen this one is from VB samples and work in o2...
for declaration I always use in one line..
' Declarations and such needed for the example:in Visual Basic
' (Copy them to the (declarations) section of a module.)
Declare Function GetVolumeInformation Lib "kernel32.dll" Alias "GetVolumeInformationA" (ByVal RPName As String, ByVal VNBuff As String, ByVal VNSize As Long, VSNum As Long, MaxL As Long, Flags As Long, ByVal SysBuffer As String, ByVal SysSize As Long) As Long
' Display the volume label, serial number, and file system name
' of the C: drive. Note how the serial number value is manipulated to
' display it properly.
Dim volname As String ' receives volume name of C:
Dim sn As Long ' receives serial number of C:
Dim snstr As String ' display form of serial number
Dim maxcomplen As Long ' receives maximum component length
Dim sysflags As Long ' receives file system flags
Dim sysname As String ' receives the file system name
Dim retval As Long ' return value
'right$ macro
Macro RightS(s,i)
mid(s,(-i))
end macro
' Initialize string buffers.
volname = Space(256)
sysname = Space(256)
' Get information about the C: drive's volume.
retval = GetVolumeInformation("C:\", volname, Len(volname), sn, maxcomplen, sysflags, sysname, Len(sysname))
' Remove the trailing nulls from the two strings.
volname = Left(volname, InStr(volname, chr(0)) - 1)
sysname = Left(sysname, InStr(sysname, chr(0)) - 1)
' Format the serial number properly.
snstr = LTrim(Hex(sn))
snstr = String(8 - Len(snstr), "0") + snstr
snstr = Left(snstr, 4) & "-" + RightS(snstr, 4)
' Display the volume name, serial number, and file system name.
Print "Volume Name: "+ volname
Print "Serial Number: "+ snstr
Print "File System: "+sysname