How to get the value of advanced power settings

核能气质少年 提交于 2019-12-13 06:29:45

问题


I try to read/get those advanced settings values such as Put the computer to sleep on my UWP application and follow this article How to get the value of advanced power settings but in UWP it is not working because the example is only for Windows 8.1 and WPF.

Anybody have tried this kind of features in their application?

My goal only for this is to get the values from the corresponding settings.


回答1:


I don't think it's easily achievable. There's no out of the box API exposed to retrieve such data. Not according to to this document at least.

I'm pretty sure you would need to deal with the native interoperability (aka DllImport). Check this post on how to retrieve this kind of data and use it as a guideline to retrieve data that you're interested in



来源:https://stackoverflow.com/questions/53562402/how-to-get-the-value-of-advanced-power-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!