User32SetDisplayConfig Method
Modifies the display topology, source, and target modes by exclusively enabling the
specified paths in the current session.
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.
No code example is currently available or this language may not be supported.
- pathInfoArrayCount UInt32
-
Number of elements in pathInfoArray parameter.
- pathInfoArray DisplayConfigPathInfo (Optional)
-
Array of all display paths that are to be set.
Only the paths within this array that have the
DISPLAYCONFIG_PATH_ACTIVE flag set in the
Flags member are set.
This parameter can be .
The order in which active paths appear in this array determines the path priority.
- modeInfoArrayCount UInt32
-
Number of elements in modeInfoArray parameter.
- modeInfoArray DisplayConfigModeInfo (Optional)
-
Array of display source and target mode information (DisplayConfigModeInfo)
that is referenced by the ModeInfoIndex member of and
ModeInfoIndex element of path information
from pathInfoArray parameter.
This parameter can be .
- flags SetDisplayConfigFlags
-
A combination of flag values that indicates the behavior of this function.
Win32ErrorCode
The function returns one of the following return codes.
ERROR_SUCCESS:
The function succeeded.
ERROR_INVALID_PARAMETER:
The combination of parameters and flags specified is invalid.
ERROR_NOT_SUPPORTED:
The system is not running a graphics driver that was written according to
the Windows Display Driver Model (WDDM).
The function is only supported on a system with a WDDM driver running.
ERROR_ACCESS_DENIED:
The caller does not have access to the console session.
This error occurs if the calling process does not have access to the current desktop
or is running on a remote session.
ERROR_GEN_FAILURE:
An unspecified error occurred.
ERROR_BAD_CONFIGURATION:
The function could not find a workable solution for the source
and target modes that the caller did not specify.