English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i want to know coding part (i mean program) how to restart my computer writing my own program using either c/c++ language

2006-08-14 01:46:54 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

This trick is done, using the Windows API. Visit this link for some details:

http://www.codersource.net/mfc_shutdown_timer.html

I hope this helps

2006-08-14 01:54:48 · answer #1 · answered by Anonymous · 1 0

frankly, I dont know if there is a uniform way of doing this.
but I can suggest a quick and dirty hack to do this

use something like
system("shutdown -r") on windows/linux etc.

These will invoke the native OS calls to do what you want. Its also really ugly. I am hoping someone else gives you a better way to solve this problem!

2006-08-14 01:52:33 · answer #2 · answered by Neil 5 · 1 0

Using interrupts.. Refer Interrupt programmng in C - byu yeshwant kanethkar

2006-08-14 01:49:00 · answer #3 · answered by sudhars_mail 1 · 0 0

There are two methods

1. Call the "shutdown.exe" (with params "/r" if you are on windows)

2. Send the system the appropriate termination signal

2006-08-14 01:52:29 · answer #4 · answered by ycareabout2moro 2 · 0 0

no idea dont get a virus

2006-08-14 01:51:25 · answer #5 · answered by Anonymous · 0 1

fedest.com, questions and answers