vault backup: 2024-01-25 18:37:03
This commit is contained in:
8
00. Inbox/CPI Performance Control.canvas
Normal file
8
00. Inbox/CPI Performance Control.canvas
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"a6fd325c1a234a01","x":-332,"y":-85,"width":250,"height":60,"type":"text","text":"PowerGetActiveScheme "},
|
||||
{"id":"4fa5457ba811c3cc","x":-240,"y":-280,"width":354,"height":142,"type":"text","text":"PowerWriteACValuesIndex\nPowerWriteDCValuesIndex"},
|
||||
{"id":"115ae73c803b7ac9","x":-348,"y":5,"width":628,"height":375,"type":"text","text":"```cpp\n#include <windows.h>\n#include <powrprof.h>\n\nint main() {\n // 切換到高性能計畫\n GUID activeScheme;\n if (PowerGetActiveScheme(NULL, &activeScheme) == ERROR_SUCCESS) {\n if (PowerSetActiveScheme(NULL, &activeScheme) == ERROR_SUCCESS) {\n printf(\"Switched to high performance power plan.\\n\");\n } else {\n printf(\"Failed to switch power plan.\\n\");\n }\n } else {\n printf(\"Failed to get active power scheme.\\n\");\n }\n\n return 0;\n}\n```"}
|
||||
],
|
||||
"edges":[]
|
||||
}
|
||||
Reference in New Issue
Block a user