开发者

How to read currently connected monitor(s) IDs?

开发者 https://www.devze.com 2023-04-03 01:23 出处:网络
In registry there is a key:开发者_Python百科 HKLM\\SYSTEM\\CurrentControlSet\\Enum\\DISPLAY\\{VESA_Monitor_ID}\\{PnP_ID}\\Device Parmeters\\EDID

In registry there is a key:

开发者_Python百科
HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\{VESA_Monitor_ID}\{PnP_ID}\Device Parmeters\EDID  

I want to know, if there is a way to get the {VESA_Monitor_ID} and {PnP_ID}? Is there an API for this, or can i do this somehow using C or C++?

Thanks!


You're probably looking for EnumMonitors(), EnumDisplayDevices() or SetupDiGetClassDevs().


You can get this from the Win32_DesktopMonitor WMI Class.

Example: Getting WMI Data from the Local Computer

http://msdn.microsoft.com/en-us/library/aa390423(v=vs.85).aspx

Just replace Win32_OperatingSystem in the query from the example.

0

精彩评论

暂无评论...
验证码 换一张
取 消