wallon14
Messages postés56Date d'inscriptionvendredi 17 octobre 2003StatutMembreDernière intervention 3 juillet 2005 18 janv. 2006 à 15:59
Merci :)
cs_yoman64
Messages postés592Date d'inscriptionsamedi 19 janvier 2002StatutMembreDernière intervention 4 décembre 2008 9 juin 2002 à 07:38
Vla pour les parresseus la source qui donne le type aussi:
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Const DRIVE_CDROM = 5
Const DRIVE_FIXED = 3
Const DRIVE_RAMDISK = 6
Const DRIVE_REMOTE = 4
Const DRIVE_REMOVABLE = 2
Const DRIVE_UNKNOW = 0
Const NO_DRIVE = 1
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
Le sub:
Dim Lecteur As String
Dim i As Integer
For i = 0 To 25
Lecteur = Chr$(i + 65) & ":"
R = GetDriveType(Lecteur)
If R <> NO_DRIVE Then
If R 5 Then R "CDROM"
If R 3 Then R "Disque Dur"
If R 6 Then R "Disque Ram"
If R 4 Then R "Lecteur Réseau"
If R 2 Then R "Disque Amovible"
Set NodX = Tvw.Nodes.Add("disk", tvwChild, "", Lecteur & " : " & R)
End If
Next i
Arkeur
Messages postés9Date d'inscriptionvendredi 17 mai 2002StatutMembreDernière intervention 6 mars 2003 19 mai 2002 à 15:15
génial.... et voila comment evité une prise de tête en kelkues cliks....
fbrt
Messages postés39Date d'inscriptionlundi 25 février 2002StatutMembreDernière intervention16 avril 2005 4 mars 2002 à 09:53
18 janv. 2006 à 15:59
9 juin 2002 à 07:38
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Const DRIVE_CDROM = 5
Const DRIVE_FIXED = 3
Const DRIVE_RAMDISK = 6
Const DRIVE_REMOTE = 4
Const DRIVE_REMOVABLE = 2
Const DRIVE_UNKNOW = 0
Const NO_DRIVE = 1
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
Le sub:
Dim Lecteur As String
Dim i As Integer
For i = 0 To 25
Lecteur = Chr$(i + 65) & ":"
R = GetDriveType(Lecteur)
If R <> NO_DRIVE Then
If R 5 Then R "CDROM"
If R 3 Then R "Disque Dur"
If R 6 Then R "Disque Ram"
If R 4 Then R "Lecteur Réseau"
If R 2 Then R "Disque Amovible"
Set NodX = Tvw.Nodes.Add("disk", tvwChild, "", Lecteur & " : " & R)
End If
Next i
19 mai 2002 à 15:15
4 mars 2002 à 09:53
13 nov. 2001 à 13:05
:o)