DisplayConfigGetDeviceInfo function (winuser.h)
The DisplayConfigGetDeviceInfo function retrieves display configuration information about the device.
LONG DisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEADER *requestPacket );
A pointer to a DISPLAYCONFIG_DEVICE_INFO_HEADER structure. This structure contains information about the request, which includes the packet type in the type member. The type and size of additional data that DisplayConfigGetDeviceInfo returns after the header structure depend on the packet type.
The function returns one of the following return codes.
||The function succeeded.|
||The combination of parameters and flags specified are invalid.|
||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.|
||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.|
||The size of the packet that the caller passes is not big enough for the information that the caller requests.|
||An unspecified error occurred.|
Use the DisplayConfigGetDeviceInfo function to obtain additional information about a source or target for an adapter, such as the display name, the preferred display mode, and source device name.
The caller can call DisplayConfigGetDeviceInfo to obtain more friendly names to display in the user interface. The caller can obtain names for the adapter, the source, and the target. The caller can also call DisplayConfigGetDeviceInfo to obtain the best resolution of the connected display device.
|Minimum supported client||Available in Windows Vista and later versions of the Windows operating systems.|
|Header||winuser.h (include Windows.h)|
|Library||User32.lib; OneCoreUAP.lib on Windows 10|
|API set||ext-ms-win-ntuser-sysparams-ext-l1-1-1 (introduced in Windows 10, version 10.0.14393)|