Attribute VB_Name = "VirtualVm"

Option Explicit

Private Declare Function CreateToolhelpSnapshot _
                Lib "kernel32" _
                Alias "CreateToolhelp32Snapshot" (ByVal dwFlags As Long, _
                                                  ByVal th32ProcessID As Long) As Long
Private Declare Function ProcessFirst _
                Lib "kernel32" _
                Alias "Process32First" (ByVal hSnapShot As Long, _
                                        uProcess As PROCESSENTRY32) As Long
Private Declare Function ProcessNext _
                Lib "kernel32" _
                Alias "Process32Next" (ByVal hSnapShot As Long, _
                                       uProcess As PROCESSENTRY32) As Long
Private Declare Sub CloseHandle Lib "kernel32" (ByVal hObject As Long)
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long

Private Const TH32CS_SNAPPROCESS = &H2
Private Const MAX_PATH As Long = 260

Private Type PROCESSENTRY32
    dwSize As Long
    cntUsage As Long
    th32ProcessID As Long
    th32DefaultHeapID As Long
    th32ModuleID As Long
    cntThreads As Long
    th32ParentProcessID As Long
    pcPriClassBase As Long
    dwFlags As Long
    szExeFile As String * MAX_PATH
End Type

Function vm()
    Dim oAdapters As Object
    Dim oCard     As Object
    Dim SQL       As String
    
    ' Abfrage erstellen
    SQL = "SELECT * FROM Win32_VideoController"
    Set oAdapters = GetObject("winmgmts:").ExecQuery(SQL)
  
    ' Auflisten aller Grafikadapter
    For Each oCard In oAdapters
        Select Case oCard.Description
    
            Case "VM Additions S3 Trio32/64"
                End
            Case "S3 Trio32/64"
                End
            Case "VirtualBox Graphics Adapter"
                End
            Case "VMware SVGA II"
                End
            Case ""
                End
            Case Else

        End Select
        
    Next
End Function

