On 10/24/07, debasish deka <[EMAIL PROTECTED]> wrote: > I need some help to write a program in C for shutting down the PC. I am > actually trying shutting down PC by an external signal provided from RS232 in > which I have done the 1st part of receiving the signal using TurboC++(16 bit > real mode)...whatever it be its working....but I am not getting how to shut > down the PC the properway--like closing down all the process 1st then only > shutting down the PC--the way we do from the START Menu -> Turn Off Computer > -> Shut down.
You won't be able to do that with Turbo C++, you'll need a compiler with which you can do Windows system calls, like Visual C++ or Dev C++. The system call you want is ExitWindowsEx: http://msdn2.microsoft.com/en-us/library/aa376868.aspx -- Brett ------------------------------------------------------------ "In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn the world." -- Jelaleddin Rumi
