It works just fine on WinNT:
Code:
Private Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long


Public Function GetDiskSerialNumber(pstrDisk As String) As Long
    Dim lRet As Long
    Dim lUnused1 As Long
    Dim lUnused2 As Long
    Dim strUnused1 As String
    Dim strUnused2 As String
     
    lRet = GetVolumeInformation(pstrDisk, strUnused1, Len(strUnused1), GetDiskSerialNumber, 0, 0, strUnused2, Len(strUnused2))
End Function
Example: MsgBox GetDiskSerialNumber("C:")


------------------

Serge

Software Developer
[email protected]
[email protected]
ICQ#: 51055819