Wake display from suspend manually

Wake display from suspend manually

Post by Bret » Fri, 20 Jun 2003 00:04:58



I'm looking for a way to wake the display after exiting
standby. My program creates a waitable timer, puts the
system in suspend, and the timer then wakes the system.
The problem is that not all systems will automatically
wake the monitor from standby.

Thanks,
Brett

//////////////////
// Code example //
//////////////////

// 30 second timer
LARGE_INTEGER lElapse;
lElapse.QuadPart = -300000;

// Create manual-reset notification timer
// with default security, no name necessary
hTimer = CreateWaitableTimer(NULL, TRUE, NULL);

// Set timer as one-time only, no callback,
// can wake system from suspend
SetWaitableTimer(hTimer, &lElapse, 0, NULL, NULL, TRUE);

// Go into suspend (not hibernate), do not force,
// allow wakeup from timer
SetSuspendState(FALSE, FALSE, FALSE);

// Pause for 1 second
Sleep(1000);

// Clear waitable timer
CancelWaitableTimer(hTimer);

// What goes in this!?
WakeMonitor();

 
 
 

Wake display from suspend manually

Post by Alexander Grigorie » Fri, 20 Jun 2003 11:41:37


SetThreadExecutionState(ES_DISPLAY_REQUIRED)


Quote:> I'm looking for a way to wake the display after exiting
> standby. My program creates a waitable timer, puts the
> system in suspend, and the timer then wakes the system.
> The problem is that not all systems will automatically
> wake the monitor from standby.

> Thanks,
> Brett

> //////////////////
> // Code example //
> //////////////////

> // 30 second timer
> LARGE_INTEGER lElapse;
> lElapse.QuadPart = -300000;

> // Create manual-reset notification timer
> // with default security, no name necessary
> hTimer = CreateWaitableTimer(NULL, TRUE, NULL);

> // Set timer as one-time only, no callback,
> // can wake system from suspend
> SetWaitableTimer(hTimer, &lElapse, 0, NULL, NULL, TRUE);

> // Go into suspend (not hibernate), do not force,
> // allow wakeup from timer
> SetSuspendState(FALSE, FALSE, FALSE);

> // Pause for 1 second
> Sleep(1000);

> // Clear waitable timer
> CancelWaitableTimer(hTimer);

> // What goes in this!?
> WakeMonitor();


 
 
 

Wake display from suspend manually

Post by Bret » Sat, 21 Jun 2003 00:36:53


Thanks, been looking for that off and on for about 6
months now.

>-----Original Message-----
>SetThreadExecutionState(ES_DISPLAY_REQUIRED)



>> I'm looking for a way to wake the display after exiting
>> standby. My program creates a waitable timer, puts the
>> system in suspend, and the timer then wakes the system.
>> The problem is that not all systems will automatically
>> wake the monitor from standby.

>> Thanks,
>> Brett

>> //////////////////
>> // Code example //
>> //////////////////

>> // 30 second timer
>> LARGE_INTEGER lElapse;
>> lElapse.QuadPart = -300000;

>> // Create manual-reset notification timer
>> // with default security, no name necessary
>> hTimer = CreateWaitableTimer(NULL, TRUE, NULL);

>> // Set timer as one-time only, no callback,
>> // can wake system from suspend
>> SetWaitableTimer(hTimer, &lElapse, 0, NULL, NULL,
TRUE);

>> // Go into suspend (not hibernate), do not force,
>> // allow wakeup from timer
>> SetSuspendState(FALSE, FALSE, FALSE);

>> // Pause for 1 second
>> Sleep(1000);

>> // Clear waitable timer
>> CancelWaitableTimer(hTimer);

>> // What goes in this!?
>> WakeMonitor();

>.

 
 
 

1. Suspend mode - wake-up the monitor after

Hello,
I made routine for program system switching to suspend
mode.
If waitable timer is over then system will wake-up.
The primary problem is - I don't know how tell WIN2000 to
switch on the monitor.
i tried dome few of process (include SystemParametersInfo)
but display stays constantly off.
Can anybody help me?

2. Help with mailing to program on 8.6.8

3. programmatically wake from suspend

4. Windows finds no mice!

5. Waking up a Win95 machine from suspend mode

6. 320/540 Processor upgrades

7. Wake up desktop after Suspend using SetSystemPowerState/SetSuspendState in Win 2k/XP

8. series5mx pop3 app

9. System Wake Up Timer from S3, S4 (Suspend/Hibernate)

10. Building a Filter Graph Manually

11. Create a device context with 8,16,24,32 bpp manually

12. Preventing user from manually deleting a shared, locked file

13. Manually add entry to Win2k regitry to use a driver