fatemi capire bene
io so sempre fatto cosi per avere il seriale:
codice:
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 GetSerialNumber(sRoot As String) As Long
Dim lSerialNum As Long
Dim R As Long
Dim sTemp1 As String
Dim sTemp2 As String
sTemp1 = String$(255, Chr$(0))
sTemp2 = String$(255, Chr$(0))
R = GetVolumeInformation(sRoot, sTemp1, Len(sTemp1), lSerialNum, 0, 0, sTemp2, Len(sTemp2))
GetSerialNumber = lSerialNum
End Function
naturelmente questo lo metto in un modulo e poi chiamo la funzione cosi:
codice:
MsgBox GetSerialNumber("c:\")
che significa che non è univoco???