Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Sampel source codes of restarting system  (Read 3500 times)

0 Members and 1 Guest are viewing this topic.

Stan Huang

    Topic Starter


    Beginner

    • Experience: Experienced
    • OS: Windows 7
    Sampel source codes of restarting system
    « on: June 13, 2013, 11:50:46 PM »
    I would like to have a program which will restart any specified cycles of the system. It would be a GUI one and its interface is simple:
    . an edit field to set the restart cycle,
    . a field to show the current cycle,
    . an edit field to set the time from system start to next restart
    . and a button to start it
    . a button to stop it.

    Is there any kinds of free source I can find to save time? C++/C# are both OK.

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Sampel source codes of restarting system
    « Reply #1 on: June 15, 2013, 02:11:21 PM »
    Quote
    I would like to have a program which will restart any specified cycles of the system.

    Are you refering to Services in Windows that you want to Start, Stop, Cycle (Restart)?

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Sampel source codes of restarting system
    « Reply #2 on: June 15, 2013, 04:35:47 PM »
    I don't understand what you want to do.
    What kind of cycle do you want to restart?
    Is this a PC or a washing machine?

    Stan Huang

      Topic Starter


      Beginner

      • Experience: Experienced
      • OS: Windows 7
      Re: Sampel source codes of restarting system
      « Reply #3 on: June 16, 2013, 01:17:49 AM »
      Its' surely a PC.

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Sampel source codes of restarting system
      « Reply #4 on: June 16, 2013, 01:32:36 AM »
      There is simple code to reset the computer. But this is done only in real mode. Old 16 bit DOS programs would do that.
      In 32 bit programming you just don't do that. Thee is a prover way to shutdown or restart the system. Anything else is considered a "hack" and is not recommended.
      Please read this. Then come back and restate your objective.
      http://msdn.microsoft.com/en-us/library/windows/desktop/aa373680%28v=vs.85%29.aspx
      Hope this is some help.