How to detect if monitor is a projector?
Asked Answered
M

1

10

Is there a way to use the Windows APIs to detect if a particular monitor is a projector (beamer) rather than a screen?

(I'm writing a projection mapping desktop application, and I'd like it to automatically detect if a projector is attached and active to allow the user to compare the reality to the preview.)

I've used both EnumDisplayMonitors and EnumDisplayDevices to find the monitors, but I can't find any flag or other indication of the type of the display. I've looked in the DEVMODE and the DISPLAY_DEVICE and the registry keys the latter points to. I don't see a DeviceCapabilities or GetDeviceCaps call that can distinguish between a screen and a projector. I also looked in the device manager to see if there was a property that distinguishes my regular monitor from the projector, but I couldn't find anything. So maybe there's no way to do it.

But, the Screen Resolution control panel applet identifies the projector as "PROJECTOR" while identifying my primary monitor as "Dell U3011." Using EnumDisplayDevices, I can get the "Dell U3011" string from the DISPLAY_DEVICE, but, for the projector, I get just "Generic PnP Monitor." Somehow, the applet must be looking somewhere else to get that "PROJECTOR" string or it shows "PROJECTOR" for any Generic PnP Monitor that seems to be a projector. So where does it look and how does it know?

Metametabel answered 1/4, 2018 at 21:39 Comment(7)
Very similar (but non-duplicate) question (with no correct answer): #22725302Metametabel
Note that monitors (and presumably projectors) have an EEPROM that is accessible via I2C in the display cable that contains Extended Display Information Data. This is likely where something like "Dell U3011" may come from (or maybe not). Anyway, this data may be available via the driver (I don't know) and may help. If nothing else, you know it exists now :)Gerbold
the same question - #41689146Claraclarabella
@Steve: Having looked into this in the past, I don't think my projector provides EDID. I can find the EDID for my Dell monitor, but not for the projector.Metametabel
@Steve: Aha! I take that back. There is EDID for the projector, and that's where the PROJECTOR string is coming from. Reading more about EDID, it seems the only indicator that a device is a projector is whether either or both of the image dimensions are 0. Sadly, that's not the case for my projector, so I guess the answer to this question is that there's no way to know.Metametabel
@AdrianMcCarthy: I think you're talking about the physical size indicator there, not the pixel count.Algor
@MSalters: Yes, I am talking about the physical image size. If I'm understanding correctly, projectors are supposed to set one or both of those to 0, since the physical size depends on things like the throw distance. Unfortunately, my projectors don't set any of those bytes to 0.Metametabel
M
2

I believe the answer is that there is no reliable way to do it.

The "PROJECTOR" string that the control panel showed was arbitrary text that the system pulled from the EDID information. As far as I can tell, Windows doesn't actually "know" whether a monitor is a projector or an LCD panel or a CRT tube.

The EDID information doesn't seem to have a flag to indicate whether this is a projector. I saw a note that projectors will typically set one or both of the physical image dimensions (the ones measured in centimeters) to zero. But that was in a description of EDID 1.4, and most of my devices use EDID 1.3. Indeed, none of the projectors that I tried have a 0 for any physical dimension, so it's not a reliable signal.

Metametabel answered 1/4, 2018 at 21:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.