Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get a friendly monitor display name from the DeviceID

663 views
Skip to first unread message

David Lowndes

unread,
Jun 17, 2009, 7:00:42 PM6/17/09
to
Using EnumDisplayDevices I can get a generic name for attached
monitors:

DeviceName "\\.\DISPLAY1\Monitor0"
DeviceString "Generic PnP Monitor"
StateFlags 0x00000003
DeviceID
"\\?\DISPLAY#SAM043F#5&2914ef34&0&UID268435460#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"
DeviceKey
"\Registry\Machine\System\CurrentControlSet\Control\Class\{4d36e96e-e325-11ce-bfc1-08002be10318}\0002"
char [128]

However I note that the Windows 7 screen resolution applet (and I
think I recall Vista doing the same) is able to display a friendly
description of the monitor - "SyncMaster" in this case. I assume the
DeviceID SAM043F is the key identifier that it's a Samsung monitor,
but I don't know how to find the descriptive name from this DeviceID.

Dave

Remy Lebeau

unread,
Jun 17, 2009, 7:57:46 PM6/17/09
to

"David Lowndes" <Dav...@example.invalid> wrote in message
news:g9si35hoanptnidce...@4ax.com...

> However I note that the Windows 7 screen resolution applet
> (and I think I recall Vista doing the same) is able to display a
> friendly description of the monitor - "SyncMaster" in this case.
> I assume the DeviceID SAM043F is the key identifier that it's
> a Samsung monitor, but I don't know how to find the descriptive
> name from this DeviceID.

The DeviceKey tells you where in the Registry you can find the settings of
the device. For example, on my machine, each monitor DeviceKey has a
"DriverDesc" value that contains the friendly name.

--
Remy Lebeau (TeamB)


David Lowndes

unread,
Jun 18, 2009, 2:56:40 AM6/18/09
to
>The DeviceKey tells you where in the Registry you can find the settings of
>the device. For example, on my machine, each monitor DeviceKey has a
>"DriverDesc" value that contains the friendly name.

Hi Remy,

That registry setting is what appears in the DISPLAY_DEVICE
DeviceString - it's only a full description of the monitor once you've
installed the monitor's driver. Prior to that it's the "Generic PnP
Monitor" monitor text (or the non-Pnp one).

Somehow, W7 (and I think Vista) manage to obtain a more useful
friendly name for the monitor before you have installed the monitor's
driver, and it's that mechanism that I'm trying to duplicate.

Dave

0 new messages