User32QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, IntPtr) Method
Retrieves information about all possible display paths for
all display devices, or views, in the current setting.
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", ExactSpelling := true>]
Public Shared Function QueryDisplayConfig (
flags As QueryDisplayConfigFlags,
ByRef refPathInfoArrayCount As UInteger,
<OutAttribute> pathInfoArray As DisplayConfigPathInfo(),
ByRef refModeInfoArrayCount As UInteger,
<OutAttribute> modeInfoArray As DisplayConfigModeInfo(),
currentTopologyId As IntPtr
) As Win32ErrorCode
Dim flags As QueryDisplayConfigFlags
Dim refPathInfoArrayCount As UInteger
Dim pathInfoArray As DisplayConfigPathInfo()
Dim refModeInfoArrayCount As UInteger
Dim modeInfoArray As DisplayConfigModeInfo()
Dim currentTopologyId As IntPtr
Dim returnValue As Win32ErrorCode
returnValue = User32.QueryDisplayConfig(flags,
refPathInfoArrayCount, pathInfoArray,
refModeInfoArrayCount, modeInfoArray,
currentTopologyId)
No code example is currently available or this language may not be supported.
- flags QueryDisplayConfigFlags
-
The type of information to retrieve.
- refPathInfoArrayCount UInt32
-
The number of elements in pathInfoArray parameter.
This parameter cannot be .
If QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, DisplayConfigTopologyId) returns ERROR_SUCCESS,
refPathInfoArrayCount is updated with the number of
valid entries in pathInfoArray.
- pathInfoArray DisplayConfigPathInfo
-
An array of DisplayConfigPathInfo elements.
Each element in pathInfoArray describes a single path from a source to a target.
The source and target mode information indexes are only valid in combination with
the modeInfoArray tables that are returned for the API at the same time.
This parameter can be .
The pathInfoArray is always returned in path priority order.
- refModeInfoArrayCount UInt32
-
The number of elements in modeInfoArray parameter.
This parameter can be .
If QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, DisplayConfigTopologyId) returns ERROR_SUCCESS,
refModeInfoArrayCount is updated with the number of
valid entries in modeInfoArray.
- modeInfoArray DisplayConfigModeInfo
-
An array of DisplayConfigModeInfo elements.
This parameter can be .
- currentTopologyId IntPtr
-
A variable that receives the identifier of the currently active topology
(DisplayConfigTopologyId) in the CCD database.
The currentTopologyId parameter is only set when
the flags parameter value is DatabaseCurrent.
If the flags parameter value is set to DatabaseCurrent,
the currentTopologyId parameter must not be Zero.
If the flags parameter value is not set to DatabaseCurrent,
the currentTopologyId parameter value must be Zero.
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_INSUFFICIENT_BUFFER:
The supplied path and mode buffer are too small..