Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
DISPLAY (Structures)
.
The DISPLAY_DEVICE structure receives information about the display device specified by the iDevNum parameter of the EnumDisplayDevices function.
C# Definition:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public struct DISPLAY_DEVICE
{
[MarshalAs(UnmanagedType.U4)]
public int cb;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)]
public string DeviceName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceString;
[MarshalAs(UnmanagedType.U4)]
public DisplayDeviceStateFlags StateFlags;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceKey;
}
VB.NET Definition:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _
Public Structure DISPLAY_DEVICE
<MarshalAs(UnmanagedType.U4)> _
Public cb As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> _
Public DeviceName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
Public DeviceString As String
<MarshalAs(UnmanagedType.U4)> _
Public StateFlags As DisplayDeviceStateFlags
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
Public DeviceID As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
Public DeviceKey As String
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class DISPLAY_DEVICE {
public int cb=0;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]
public string DeviceName=new String(' ',32);
[MarshalAs( UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceString=new String(' ',128);
public int StateFlags=0;
[MarshalAs( UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceID=new String(' ',128);
[MarshalAs( UnmanagedType.ByValTStr, SizeConst=128)]
public string DeviceKey=new String(' ',128);
}
VB Definition:
Structure DISPLAY_DEVICE
Public TODO
End Structure
Works much better on Win7 with CharSet=CharSet.Auto. Suspect this is true of a bunch of other structs defined on this site as well as with at least a few predecessors of Win7.
On my Windows 7 I build for x86 I need to use CharSet.Ansi, thats why I revert it back. Feel free and try for yourself.
The EnumDisplayDevices API
12/16/2019 5:31:09 PM - -88.69.25.3
The EnumDisplayDevices API
12/16/2019 5:31:09 PM - -88.69.25.3
Used with the DISPLAY_DEVICE structure.
6/18/2013 3:13:41 AM - -203.197.160.37
The EnumDisplayDevices API
12/16/2019 5:31:09 PM - -88.69.25.3
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.