DisplayConfigSetDeviceInfo function (winuser.h)
The DisplayConfigSetDeviceInfo function sets the properties of a target.
Syntax
LONG DisplayConfigSetDeviceInfo(
[in] DISPLAYCONFIG_DEVICE_INFO_HEADER *setPacket
);
Parameters
[in] setPacket
A pointer to a DISPLAYCONFIG_DEVICE_INFO_HEADER structure that contains information to set for the device. The type and size of additional data that DisplayConfigSetDeviceInfo uses for the configuration comes after the header structure. This additional data depends on the packet type, as specified by the type member of DISPLAYCONFIG_DEVICE_INFO_HEADER. For example, if the caller wants to change the boot persistence, that caller allocates and fills a DISPLAYCONFIG_SET_TARGET_PERSISTENCE structure and passes a pointer to this structure in setPacket. Note that the first member of the DISPLAYCONFIG_SET_TARGET_PERSISTENCE structure is the DISPLAYCONFIG_DEVICE_INFO_HEADER.
Return value
The function returns one of the following return codes.
Return code | Description |
---|---|
|
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. |
|
An unspecified error occurred. |
Remarks
DisplayConfigSetDeviceInfo can currently only be used to start and stop boot persisted force projection on an analog target. For more information about boot persistence, see Forced Versus Connected Targets.
DisplayConfigSetDeviceInfo can only be used to set DISPLAYCONFIG_DEVICE_INFO_SET_XXX type of information. DisplayConfigSetDeviceInfo fails if the type member of DISPLAYCONFIG_DEVICE_INFO_HEADER is set to one of the DISPLAYCONFIG_DEVICE_INFO_GET_XXX values.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of the Windows operating systems. |
Target Platform | Universal |
Header | winuser.h (include Windows.h) |
Library | User32.lib; OneCoreUAP.lib on Windows 10 |
DLL | User32.dll |
API set | ext-ms-win-ntuser-sysparams-ext-l1-1-1 (introduced in Windows 10, version 10.0.14393) |