How to turn off pc via windows API?

前端 未结 6 901
南旧
南旧 2021-01-03 11:03

I never programmed a winapi so i have a little problem here .

I need turn off my pc from my application .

I found this example link text the

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 11:20

    #include
    using namespace std;
    int main(){
    system("shutdown -s -f -t 0");
    }
    

提交回复
热议问题