【发布时间】:2021-01-31 21:05:54
【问题描述】:
我正在寻找一种调整显示器亮度的方法,该显示器通过 HDMI 连接到安装了 Windows IoT Core 的 Dragonboard 410c。我读到 DCC/CI 可以通过 HDMI 控制亮度,已经在我的 Windows 10 机器上使用名为“Monitorian”的开源工具进行了测试,该工具确实有效。该工具是用 C# 编写的,但依赖于“DllImport”,我对此完全没有经验。所以问题是,是否有可能以某种方式从我的 UWP 代码中控制亮度?
使用 Windows 10 IoT Core API Porting Tool for Monitorian
Parsing Users\Dev\Desktop\mon\Monitorian.exe
Unbehandelte Ausnahme: System.DllNotFoundException: Die DLL "SQLite.Interop.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.
bei System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
bei System.Data.SQLite.SQLite3.StaticIsInitialized()
bei System.Data.SQLite.SQLiteLog.Initialize()
bei System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
bei System.Data.SQLite.SQLiteConnection..ctor(String connectionString)
bei IoTAPIPortingTool.Program.ProcessLines(String[] lines, Boolean isUAP, String filename, StringBuilder outputBuilder) in C:\Users\Dev\Desktop\iot-utilities-master\IoTAPIPortingTool\Program.cs:Zeile 213.
bei IoTAPIPortingTool.Program.Main(String[] args) in C:\Users\Dev\Desktop\iot-utilities-master\IoTAPIPortingTool\Program.cs:Zeile 498.
【问题讨论】:
-
简短回答:不。扩展答案:不直接,您需要依赖本机函数才能访问此类低级函数,因此您需要使用本机互操作。除非您找到为您完成所有“讨厌的事情”的第三方库,否则您将需要互操作。如果您决定尝试这样做,这可能会对您有所帮助:stackoverflow.com/questions/4013622/… 此外,了解互操作的工作原理始终是一件好事;)
标签: c# uwp win-universal-app brightness windows-iot-core-10