开发者

How to read currently connected monitor(s) IDs?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜