Rebooting a system in windows

This is a discussion on Rebooting a system in windows within the C Programming forums, part of the General Programming Boards category; Respected sir, I (chandramouli) am working as programmer. I faced a doubt in C language i.e. How to reboot a ...

  1. #1
    chandunio
    Guest

    Rebooting a system in windows

    Respected sir,

    I (chandramouli) am working as programmer. I faced a doubt in C language i.e. How to reboot a system from windows environment?
    Using turbo C compiler, we will reboot the system using Interrupts in C language. But this will works under 16-bit(MS-DOS) environment only.

    Finally, i am requsting you to send me a program for rebooting a system.

    my mail id: chandunio@yahoo.com

    Thanking you sir,

    Yours sincerely
    chandramouli.p

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I have an two thoughts. First is do a search, but I doubt you will find anything useful as this question is usually asking how to do this using the win api. My second would be:

    Code:
    printf("Please press CTRL+ALT+DEL\n"); //:)

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685

    D'oh!

    Wait a sec. I missed something there. You could use a function like this:

    Code:
    #include <windows.h>
    int APIENTRY CloseWindows(void){
        MessageBox(0, "Good bye.", "Shut down", 0);
        ExitWindowsEx(EWX_FORCE | EWX_REBOOT, 0);
        return 0;
    }
    This isn't 100% safe but it works.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Computer Not Booting
    By jrahhali in forum Tech Board
    Replies: 61
    Last Post: 10-08-2004, 11:32 AM
  2. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 06:12 AM
  3. Windows XP rebooting
    By MethodMan in forum Tech Board
    Replies: 6
    Last Post: 11-13-2003, 01:25 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. disabling system keys in a windows console
    By Shadow in forum Windows Programming
    Replies: 3
    Last Post: 06-23-2002, 07:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21