[DllImport("user32.dll")]
static extern bool EnumDisplayDevices(string lpDevice, uint iDevNum,
out DISPLAY_DEVICE lpDisplayDevice, uint dwFlags);
None.
None.
Please add some!
DISPLAY_DEVICE d=new DISPLAY_DEVICE();
d.cb=Marshal.SizeOf(d);
int id=0;
try {
while (EnumDisplayDevices(null, id, out d, 0)) {
Console.WriteLine(
String.Format("{0}, {1}, {2}, {3}, {4}, {5}",
id,
d.DeviceName,
d.DeviceString,
d.StateFlags,
d.DeviceID,
d.DeviceKey
)
);
id++;
d.cb=Marshal.SizeOf(d);
}
}
catch (Exception ex) {
Console.WriteLine(String.Format("{0}",ex.ToString()));
}
Do you know one? Please contribute it!