| 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 Private Sub Form_Load() 'VbAndJava 1999/2000 'Guerrault Yonni 'E-Mail : Yonni4@iFrance.com Dim Serial As Long, VName As String, FSName As String VName = String$(255, Chr$(0)) FSName = String$(255, Chr$(0)) GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255 VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1) FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1) MsgBox "Le nom du volume de C:\ est " + VName + ", le nom du fichier system de C:\ est " + FSName + "' et le n° de série de C:\ est " + Trim(Str$(Serial)) + "'", vbInformation + vbOKOnly, App.Title End Sub |