CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Rebooting

  1. #1
    Join Date
    May 1999
    Posts
    68

    Rebooting

    Hi,

    How can i force a reboot of a Windows 95/98/NT pc using VC++. I need to be able to reboot this machine without user-questions popping up about saving documents e.g. or a sysem waiting for "stopped / hanging" programs.

    I want to execute this code if a machine is leaking resources or filling it's memory caused by problems.

    Hope anyone can help me !

    -- Ron Daemen


  2. #2
    Guest

    Re: Rebooting

    ExitWindowsEx (EWX_REBOOT ,0);



  3. #3
    Join Date
    May 1999
    Posts
    31

    Re: Rebooting

    Hi,

    If you don't want questions to pop up, then use:

    ExitWindowsEx(EWX_REBOOT|EWX_FORCE,0L);

    Daniel.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured