Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to reboot the sys

how to reboot the sys

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    usha_dolly
    wrote on last edited by
    #1

    Hi How can i reboot my System , if an event generates Thanku.. Usha

    S K T 3 Replies Last reply
    0
    • U usha_dolly

      Hi How can i reboot my System , if an event generates Thanku.. Usha

      S Offline
      S Offline
      sun_shb
      wrote on last edited by
      #2

      BOOL ExitWindowsEx( UINT uFlags, // shutdown operation DWORD dwReserved // reserved ); Parameters uFlags Specifies the type of shutdown. This parameter must include one of the following values: Value Meaning EWX_LOGOFF Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off. EWX_POWEROFF Shuts down the system and turns off the power. The system must support the power-off feature. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. EWX_REBOOT Shuts down the system and then restarts the system. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. EWX_SHUTDOWN Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. This parameter can optionally include the following values: Value Meaning EWX_FORCE Forces processes to terminate. When this flag is set, the system does not send the WM_QUERYENDSESSION and WM_ENDSESSION messages. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency. EWX_FORCEIFHUNG Windows NT 5.0 and later: Forces processes to terminate if they do not respond to the WM_QUERYENDSESSION or WM_ENDSESSION message. This flag is ignored if EWX_FORCE is used. dwReserved Reserved; this parameter is ignored.

      1 Reply Last reply
      0
      • U usha_dolly

        Hi How can i reboot my System , if an event generates Thanku.. Usha

        K Offline
        K Offline
        khan
        wrote on last edited by
        #3

        ExitWindowsEx(EWX_REBOOT,EWX_FORCE); MSDN link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/how_to_shut_down_the_system.asp[^] this is this.

        S 1 Reply Last reply
        0
        • K khan

          ExitWindowsEx(EWX_REBOOT,EWX_FORCE); MSDN link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/how_to_shut_down_the_system.asp[^] this is this.

          S Offline
          S Offline
          sunit5
          wrote on last edited by
          #4

          http://www.codeproject.com/system/ShutDownAlarm.asp

          1 Reply Last reply
          0
          • U usha_dolly

            Hi How can i reboot my System , if an event generates Thanku.. Usha

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            usha_dolly wrote:

            ForumVisual C++ Subject:Re: how to reboot the sys Sender:usha_dolly Date:4:02 9 Dec '05 Hi How can i reboot my System , if an event generates

            try InitiateSystemShutdown(..)

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta VC Forum Q&A :- I/ IV

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups