如何获取高级电源设置的值 [英] How to get the value of advanced power settings

查看:28
本文介绍了如何获取高级电源设置的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在我的 UWP 应用程序上读取/获取那些高级设置值,例如让计算机进入睡眠状态,并按照这篇文章

解决方案

我认为这不容易实现.没有公开的开箱即用 API 来检索此类数据.至少不是根据这个文档.>

我很确定您需要处理 native互操作性(又名DllImport).查看这篇文章,了解如何检索此类数据并将其用作检索您感兴趣的数据的指南

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.

解决方案

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

这篇关于如何获取高级电源设置的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆