User32EnumDisplaySettings(String, EnumDisplaySettingsMode, DevMode) Method
Retrieves information about one of the graphics modes for a display device.
To retrieve information for all the graphics modes of a display device, make a series of calls to this function.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool EnumDisplaySettings(
string deviceName,
EnumDisplaySettingsMode mode,
ref DevMode refDevMode
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Ansi, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function EnumDisplaySettings (
deviceName As String,
mode As EnumDisplaySettingsMode,
ByRef refDevMode As DevMode
) As Boolean
Dim deviceName As String
Dim mode As EnumDisplaySettingsMode
Dim refDevMode As DevMode
Dim returnValue As Boolean
returnValue = User32.EnumDisplaySettings(deviceName,
mode, refDevMode)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool EnumDisplaySettings(
String^ deviceName,
EnumDisplaySettingsMode mode,
DevMode% refDevMode
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member EnumDisplaySettings :
deviceName : string *
mode : EnumDisplaySettingsMode *
refDevMode : DevMode byref -> bool
No code example is currently available or this language may not be supported.
- deviceName String
-
A pointer to a null-terminated string that specifies the
display device about whose graphics mode the function will obtain information.
This parameter is either or a DISPLAY_DEVICE.DeviceName
returned from EnumDisplayDevices(String, UInt32, DisplayDevice, UInt32).
A value specifies the current display device on the
computer on which the calling thread is running.
- mode EnumDisplaySettingsMode
-
The type of information to be retrieved.
- refDevMode DevMode
-
A pointer to a DevMode structure into which the function stores information about the specified graphics mode.
Before calling EnumDisplaySettings(String, EnumDisplaySettingsMode, DevMode),
set the SizeOfStruct member to Marshal.SizeOf(Of DevMode),
and set the DriverExtra member to indicate the size, in bytes,
of the additional space available to receive private driver data.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.