Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3335976
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:04:51+00:00 2026-05-18T00:04:51+00:00

Is there any Win32 API for waking up a system that has been shut

  • 0

Is there any Win32 API for waking up a system that has been shut down, at a specific time? I have seen a program named Autopower On which is able to power the system on at a specified time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:04:52+00:00Added an answer on May 18, 2026 at 12:04 am

    Got the below post from a site. Any body tried this?

    Nothing in the framework, so you’ll have to “PInvoke” a bit.
    The API’s you need to call are CreateWaitableTimer and SetWaitableTimer.
    Following is a complete (Q&D) sample that illustrates how you can set a
    system to be awoken from sleep/hibernate using above Win32 API’s.
    Note that here I’m setting a relative wakeup time of 300000000 nSecs.
    That means that the computer will wake-up (supposing he’s asleep or
    hibernating) within 30 seconds after setting the timer.
    Consult the MSDN docs for details on SetWaitableTimer and it’s arguments.

    using System;
    using System.Runtime.InteropServices;
    using System.Windows.Forms;
    
    namespace Willys
    {
        class Program
        {
            [DllImport("kernel32.dll")]
            public static extern IntPtr CreateWaitableTimer(IntPtr lpTimerAttributes,
            bool bManualReset, string lpTimerName);
    
            [DllImport("kernel32.dll")]
            public static extern bool SetWaitableTimer(IntPtr hTimer, [In] ref long
            pDueTime, int lPeriod, IntPtr pfnCompletionRoutine, IntPtr
            lpArgToCompletionRoutine, bool fResume);
    
            [DllImport("kernel32", SetLastError = true, ExactSpelling = true)]
            public static extern Int32 WaitForSingleObject(IntPtr handle, uint
            milliseconds);
    
            static void Main()
            {
                SetWaitForWakeUpTime();
            }
    
            static IntPtr handle;
            static void SetWaitForWakeUpTime()
            {
                long duetime = -300000000; // negative value, so a RELATIVE due time
                Console.WriteLine("{0:x}", duetime);
                handle = CreateWaitableTimer(IntPtr.Zero, true, "MyWaitabletimer");
                SetWaitableTimer(handle, ref duetime, 0, IntPtr.Zero, IntPtr.Zero, true);
                uint INFINITE = 0xFFFFFFFF;
                int ret = WaitForSingleObject(handle, INFINITE);
                MessageBox.Show("Wake up call");
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any Win32/MFC API to get the CSIDL_LOCAL_APPDATA for any user that I
Is there any scalable Win32 API (like IOCP not like select) that gives you
Is there any Win32 API to put the machine into hibernate or suspend mode?
Is there any Win32 API to check if a given handle belongs to the
Is there any way in a Win32 environment to tune the timeout on a
In Win32, is there any way to get a unique cpu cycle count or
Is there any free or commercial component written in .NET (no COM interop) that
I'd like to check if the system is in standby mode, is there any
I have an application in Visual c++ (Win32 API). In my application the main
Is there any way to check whether a file is locked without using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.