RECONHECIMENTO DE DRIVERS

USUARIO.EXCLUIDOS 30/05/2004 10:00:24
#27369
Alguem conhece algum programa que reconheça e os drivers do computador e fale de que tipo são?
Valeu gente
USUARIO.EXCLUIDOS 31/05/2004 11:30:20
#27475
Resposta escolhida

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

Sub GetDriveInfo(ByVal strDrive As String, ByRef SerialNr As Long, ByRef Label As String, ByRef FileSys As String)
Dim strLabel As String, strType As String, lRetVal As Long
strLabel = Space(256): strType = Space(256)

lRetVal = GetVolumeInformation(strDrive, strLabel, Len(strLabel), SerialNr, 0, 0, strType, Len(strType))
On Error Resume Next
Label = Mid(strLabel, 1, InStr(strLabel, vbNullChar) - 1)
FileSys = Mid(strType, 1, InStr(strType, vbNullChar) - 1)
On Error GoTo 0
End Sub


Exemplo:

Private Sub Command1_Click()
Dim Bez As String, DSys As String, Serial As Long
GetDriveInfo Left(Drive1.Drive, 2) & "\", Serial, Bez, DSys
MsgBox Bez & vbcrlf & DSys & vbcrlf & Serial
End Sub

USUARIO.EXCLUIDOS 19/07/2004 17:29:22
#34092
Seria um driverListBox, voce pode substituir por "C:\"
Tópico encerrado , respostas não são mais permitidas