__wmi_Win32_VideoController()
Func __wmi_Win32_VideoController()
Local $wbemFlagReturnImmediately = 0x10
Local $wbemFlagForwardOnly = 0x20
Local $colItems = ""
Local $strComputer = "localhost"
Local $Output=""
$Output &= "Computer: " & $strComputer & @CRLF
$Output &= "==========================================" & @CRLF
Local $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) then
For $objItem In $colItems
Local $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities(0)
$Output &= "AcceleratorCapabilities: " & $strAcceleratorCapabilities & @CRLF
$Output &= "AdapterCompatibility: " & $objItem.AdapterCompatibility & @CRLF
$Output &= "AdapterDACType: " & $objItem.AdapterDACType & @CRLF
$Output &= "AdapterRAM: " & $objItem.AdapterRAM & @CRLF
$Output &= "Availability: " & $objItem.Availability & @CRLF
Local $strCapabilityDescriptions = $objItem.CapabilityDescriptions(0)
$Output &= "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF
$Output &= "Caption: " & $objItem.Caption & @CRLF
$Output &= "ColorTableEntries: " & $objItem.ColorTableEntries & @CRLF
$Output &= "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF
$Output &= "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF
$Output &= "CreationClassName: " & $objItem.CreationClassName & @CRLF
$Output &= "CurrentBitsPerPixel: " & $objItem.CurrentBitsPerPixel & @CRLF
$Output &= "CurrentHorizontalResolution: " & $objItem.CurrentHorizontalResolution & @CRLF
$Output &= "CurrentNumberOfColors: " & $objItem.CurrentNumberOfColors & @CRLF
$Output &= "CurrentNumberOfColumns: " & $objItem.CurrentNumberOfColumns & @CRLF
$Output &= "CurrentNumberOfRows: " & $objItem.CurrentNumberOfRows & @CRLF
$Output &= "CurrentRefreshRate: " & $objItem.CurrentRefreshRate & @CRLF
$Output &= "CurrentScanMode: " & $objItem.CurrentScanMode & @CRLF
$Output &= "CurrentVerticalResolution: " & $objItem.CurrentVerticalResolution & @CRLF
$Output &= "Description: " & $objItem.Description & @CRLF
$Output &= "DeviceID: " & $objItem.DeviceID & @CRLF
$Output &= "DeviceSpecificPens: " & $objItem.DeviceSpecificPens & @CRLF
$Output &= "DitherType: " & $objItem.DitherType & @CRLF
$Output &= "DriverDate: " & WMIDateStringToDate($objItem.DriverDate) & @CRLF
$Output &= "DriverVersion: " & $objItem.DriverVersion & @CRLF
$Output &= "ErrorCleared: " & $objItem.ErrorCleared & @CRLF
$Output &= "ErrorDescription: " & $objItem.ErrorDescription & @CRLF
$Output &= "ICMIntent: " & $objItem.ICMIntent & @CRLF
$Output &= "ICMMethod: " & $objItem.ICMMethod & @CRLF
$Output &= "InfFilename: " & $objItem.InfFilename & @CRLF
$Output &= "InfSection: " & $objItem.InfSection & @CRLF
$Output &= "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
$Output &= "InstalledDisplayDrivers: " & $objItem.InstalledDisplayDrivers & @CRLF
$Output &= "LastErrorCode: " & $objItem.LastErrorCode & @CRLF
$Output &= "MaxMemorySupported: " & $objItem.MaxMemorySupported & @CRLF
$Output &= "MaxNumberControlled: " & $objItem.MaxNumberControlled & @CRLF
$Output &= "MaxRefreshRate: " & $objItem.MaxRefreshRate & @CRLF
$Output &= "MinRefreshRate: " & $objItem.MinRefreshRate & @CRLF
$Output &= "Monochrome: " & $objItem.Monochrome & @CRLF
$Output &= "Name: " & $objItem.Name & @CRLF
$Output &= "NumberOfColorPlanes: " & $objItem.NumberOfColorPlanes & @CRLF
$Output &= "NumberOfVideoPages: " & $objItem.NumberOfVideoPages & @CRLF
$Output &= "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF
Local $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)
$Output &= "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF
$Output &= "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF
$Output &= "ProtocolSupported: " & $objItem.ProtocolSupported & @CRLF
$Output &= "ReservedSystemPaletteEntries: " & $objItem.ReservedSystemPaletteEntries & @CRLF
$Output &= "SpecificationVersion: " & $objItem.SpecificationVersion & @CRLF
$Output &= "Status: " & $objItem.Status & @CRLF
$Output &= "StatusInfo: " & $objItem.StatusInfo & @CRLF
$Output &= "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF
$Output &= "SystemName: " & $objItem.SystemName & @CRLF
$Output &= "SystemPaletteEntries: " & $objItem.SystemPaletteEntries & @CRLF
$Output &= "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF
$Output &= "VideoArchitecture: " & $objItem.VideoArchitecture & @CRLF
$Output &= "VideoMemoryType: " & $objItem.VideoMemoryType & @CRLF
$Output &= "VideoMode: " & $objItem.VideoMode & @CRLF
$Output &= "VideoModeDescription: " & $objItem.VideoModeDescription & @CRLF
$Output &= "VideoProcessor: " & $objItem.VideoProcessor & @CRLF
if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
$Output=""
Next
Else
Msgbox(0,"WMI 输出","没有在类 " & "Win32_VideoController" & "中找到WMI对象" )
Endif
EndFunc
Func WMIDateStringToDate($dtmDate)
Return (StringMid($dtmDate, 5, 2) & "/" & _
StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc
|