Shutdown the computer using assembly

后端 未结 10 679
日久生厌
日久生厌 2020-12-08 11:27

How can I shutdown the computer using only assembly code?

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 11:56

    It's quite easy. Also, guys, OP might be working on his own power manager. The same exact thing I'm doing. This is an example that'll allow the user to shutdown the machine. Quite simple, just gives the user a messagebox with OK and Cancel. If the user hits OK the machine will shutdown, if the user hits cancel, the program will just exit. It is tested on the NT based windows versions, and should work on the older versions such as ME, 95, and 98.

    This is my own code, and everyone is free to use it. http://pastebin.com/ccw3mWtw

提交回复
热议问题