#post-id: 2795-00-04
#original-date: 21.03.2008 Fri
#original-time: 12:04 AM
#original-day:  2795
#original-host: WinXP Prof SP2 (Build 2600)

А вот код для получения списка всех драйверов.

Option Explicit

Declare Function EnumDeviceDrivers Lib "PSAPI.DLL" _
                       (ByRef lpImageBase As POINTER, _
                        ByVal cb As Long, _
                        ByRef lpcbNeeded As Long) As C_BOOL
Declare Function GetDeviceDriverBaseName Lib "PSAPI.DLL" _
                        Alias "GetDeviceDriverBaseNameA" _
                       (ByVal ImageBase As POINTER, _
                        ByVal lpBaseName As BStr, _
                        ByVal nSize As Long) As Long
Declare Function GetDeviceDriverFileName Lib "PSAPI.DLL" _
                        Alias "GetDeviceDriverFileNameA" _
                       (ByVal ImageBase As POINTER, _
                        ByVal lpFileName As BStr, _
                        ByVal nSize As Long) As Long

'====================================================================
Public Sub Main()
 Const MAX_BASES = 2048
 
 Dim RC As Long
 Dim pBase(0 To MAX_BASES - 1) As POINTER
 Dim cbNeeded As Long
 Dim TMP As Long
 Dim TXT As BStr
 
 RC = EnumDeviceDrivers(pBase(0), MAX_BASES * 4, cbNeeded)
 If RC = 0 Then
   MsgBox "Can't enum device drivers!", vbCritical
 Else
   For TMP = 0 To (cbNeeded / 4) - 1
     'TXT = String(1025, 0)
     'GetDeviceDriverBaseName pBase(TMP), TXT, 1024
     'TXT = asGetStringFromPointerA(TXT)
     'Debug.Print TXT
     
     TXT = String(1025, 0)
     GetDeviceDriverFileName pBase(TMP), TXT, 1024
     TXT = asGetStringFromPointerA(TXT)
     Debug.Print TXT
   Next TMP
 End If
End Sub



#music: Initial D\Initial D D Selection 3\Dave Rodgers / Saturday Night Fever