kampi
kampi

Reputation: 2484

How to read currently connected monitor(s) IDs?

In registry there is a key:

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!

Upvotes: 0

Views: 491

Answers (2)

André Caron
André Caron

Reputation: 45224

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

Upvotes: 1

John
John

Reputation: 236

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.

Upvotes: 0

Related Questions