How to turn off pc via windows API?

前端 未结 6 742
南旧
南旧 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:32

    http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspx

    Try

    ExitWindowsEx(EWX_POWEROFF, 0);
    

提交回复
热议问题