Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Shutdown from c++

  1. #11
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    Shutting down, rebooting or logging of can be accomplished in Windows by using ExitWindows or ExitWindowsEx.

    These work fine in win9x - but in NT (i.e. Win2k + XP too) you need to faff around with privileges to shut down or reboot.

    In windows NT etc, it's far too much effort, you should get a command line program like in the resource kit reboot.exe for you

    Just RTFM for ExitWindows or ExitWindowsEx (I think)

    Mark

  2. #12
    Junior Member
    Join Date
    Oct 2001
    Posts
    27
    i think there is a mizundaztanding

    ihsir just want to shut down his dos, but the other think that he want to shut down his windows

    the problem is, usually dos cannot doing any auto power off, so if you execute that outport condition, it will do the restarting (i have read one, but it use interrupt)
    if the problem, is you want the user of your program cannot use the computer after he fail 3 times,
    then you can off the ctrl-break condition, then do a not-end-loop

    hope it work
    ______________________________

  3. #13
    atleast pakdhe you understood about the dos and window confusion

    so you say that there's no way closing a system from pure dos mode.

    i dont want a 'never-ending' or a 'stop' loop i had that before but it didn't look nice so that's why i want to perform shutdown.

  4. #14
    Senior Member
    Join Date
    Oct 2001
    Posts
    677
    Just get it to ignore all keypresses afrer 3 attempts at login or whatever. The only way round is to reboot or power off. Just have it go to blank screen and not accept any input. Ctrl. Alt. Delete will still work to reboot, of course, unless there's some way of trapping that key sequence and ignoring it... But I think DOS likes to keep hold of that one in case programs go into endless loops and you have to manually reboot?!
    One Ring to rule them all, One Ring to find them.
    One Ring to bring them all and in the darkness bind them.
    (The Lord Of The Rings)
    http://www.bytekill.net

  5. #15
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    there are many ways to trap ctr_alt_delete in dos...

    There used to be a 4k proggy to halt my pc... can't remember... well sorry I'm on linux now...

    halt
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •