User32EnumDisplaySettings(String, Int32, 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,
int index,
ref DevMode refDevMode
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Ansi, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function EnumDisplaySettings (
deviceName As String,
index As Integer,
ByRef refDevMode As DevMode
) As Boolean
Dim deviceName As String
Dim index As Integer
Dim refDevMode As DevMode
Dim returnValue As Boolean
returnValue = User32.EnumDisplaySettings(deviceName,
index, refDevMode)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool EnumDisplaySettings(
String^ deviceName,
int index,
DevMode% refDevMode
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Ansi, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member EnumDisplaySettings :
deviceName : string *
index : int *
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.
- index Int32
-
The graphics mode index.
Graphics mode indices start at zero.
To obtain information for all of a display device's graphics modes,
make a series of calls to EnumDisplaySettings(String, EnumDisplaySettingsMode, DevMode), as follows:
Set index to zero for the first call,
and increment index by one for each subsequent call.
Continue calling the function until the return value is .
- 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
.