显示器 EDID 读取,生产日期和分辨率
本文来源ACN站:gyp2000
```$KeyPath = "HKLM\SYSTEM\CurrentControlSet\Enum\"
$INDEX = 57
$Computer = "."
$objWMIService = ObjGet("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& $Computer & "\root\cimv2")
$colSettings = $objWMIService.ExecQuery _
("Select * from Win32_DesktopMonitor")
For $objOperatingSystem In $colSettings
$tmp = $objOperatingSystem.PNPDeviceID
$EDID = RegRead($KeyPath & $tmp & "\Device Parameters", "EDID")
If $EDID <> "" Then
$Width = Int(BinaryMid($EDID, $INDEX, 1)) + BitAND(Int(BinaryMid($EDID, $INDEX + 2, 1)), 240) * 16
$Height = Int(BinaryMid($EDID, $INDEX + 3, 1)) + BitAND(Int(BinaryMid($EDID, $INDEX + 5, 1)), 240) * 16
MsgBox(0, "显示器EDID读取", "显示器分辨率:" & $Width & "x" & $Height & @CRLF & _
"生产日期" & Int(BinaryMid($EDID, 18, 1)) + 1990 & "年 第" & Int(BinaryMid($EDID, 17, 1)) & "周" & @CRLF & _
"EDID版本号:" & Int(BinaryMid($EDID, 19, 1)) & "." & Int(BinaryMid($EDID, 20, 1)) & @CRLF)
EndIf
Next
```
发表评论
木有头像就木JJ啦!还木有头像吗?点这里申请属于你的个性Gravatar头像吧!