/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/powerdisplay/PowerDisplay.Lib/Drivers/NativeStructures/MonitorInfoEx.cs
51 строка
1 KB
moooyo
Introduce new utility PowerDisplay to control your monitor settings (#42642)
03 фев 2026, 08:53
Не верифицирован
03 фев 2026, 08:53
18efa05
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; namespace PowerDisplay.Common.Drivers { /// <summary> /// Monitor information extended structure /// </summary> [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public unsafe struct MonitorInfoEx { /// <summary> /// Structure size /// </summary> public uint CbSize; /// <summary> /// Monitor rectangle area /// </summary> public Rect RcMonitor; /// <summary> /// Work area rectangle /// </summary> public Rect RcWork; /// <summary> /// Flags /// </summary> public uint DwFlags; /// <summary> /// Device name (e.g., "\\.\DISPLAY1") - fixed buffer for LibraryImport compatibility /// </summary> public fixed ushort SzDevice[32]; /// <summary> /// Helper property to get device name as string /// </summary> public readonly string GetDeviceName() { fixed (ushort* ptr = SzDevice) { return new string((char*)ptr); } } } }