无忧启动论坛

 找回密码
 注册
搜索

有会用aardio代码的看看这个怎么写

查看数: 4073 | 评论数: 4 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2022-12-23 14:35

正文摘要:

https://learn.microsoft.com/zh-c ... tprocessinformation PROCESS_POWER_THROTTLING_STATE PowerThrottling; RtlZeroMemory(&PowerThrottling, sizeof(PowerThrottling)); PowerThrottling.Version = PROC ...

回复

nowayer 发表于 2023-12-4 06:31:39
提示: 作者被禁止或删除 内容自动屏蔽
Jacen 发表于 2023-1-1 17:46:21
其实很简单,这样写就可以了:
  1. import process;

  2. var throttlingState = {
  3.     INT version = 1;
  4.     INT controlMask = 1;
  5.     INT stateMask = 1;
  6. }

  7. ::Kernel32.SetProcessInformation(
  8.     process(),4,throttlingState,raw.sizeof(throttlingState)
  9. );

复制代码
不过要同时设置一下进程优先级,任务管理器才会显示绿叶标志。

新版 aardio 里已经有这个范例,可以查看、切换效率模式。
范例位置:进程 / 效率模式
黑中见白 发表于 2022-12-24 01:49:53
666...

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-7-30 13:21

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表