Thread View: comp.ms-windows.programmer.vxd
2 messages
2 total messages
Started by Rohit
Mon, 11 May 1998 00:00
Can I resume a suspended Windows 95 system through a program
Author: Rohit
Date: Mon, 11 May 1998 00:00
Date: Mon, 11 May 1998 00:00
19 lines
2146 bytes
2146 bytes
I have a problem :-( I'm trying to write a program to resume my PC (running Windows 95), after suspending it by choosing "Suspend" from the Start Menu on the task bar. Generally, one can resume a suspended system by either moving the mouse or by pressing any key on the keyboard. In my program I'm trying to resume the system by using WM_TIMER. In the program I'm setting the timer to go off after 1 minute. When my program receives the WM_TIMER message I use ::mouse_event() to synthesize a mouse move. This should resume my system but it doesn't. The reason being, once you suspend the system the program doesn't receive any WM_TIMER message. The main objective behind this program is to be able to suspend the system and then later resume it at time specified by the user of the program. Is there a way in which I can do this using SDK,C++,VC++ or assembly language.
Re: Can I resume a suspended Windows 95 system through a program
Author: dave porter
Date: Fri, 15 May 1998 00:00
Date: Fri, 15 May 1998 00:00
52 lines
3093 bytes
3093 bytes
If the system is suspended, the CPU ain't running, so it's difficult to wake the system up from code. Simulating I/O will not help; it's the actual hardware interrupt which causes the chipset to wake up. Win98 will allow timer-based wakeups via 'waitable timers', see CreateWaitableTimer. The implication (by omission) is that this is the only way to wake the system up on a timer. It may require ACPI hardware, since pretty obviously you need a timer that's not implemented in software. Waitable timers do not exist in Win95 (at least the doc says they don't). And even if they did it's not clear that they'd have the wakeup side-effect. And even if they did that on ACPI hardware it's not clear they'd do that on APM hardware. dave -- For email, please remove the 'w' from my address. Sorry. Rohit <rohit@interpow.net> wrote in article <3557781a.0@news.interpow.net>... > I have a problem :-( > > I'm trying to write a program to resume my PC (running Windows 95), after > suspending it by choosing "Suspend" from the Start Menu on the task bar. > > Generally, one can resume a suspended system by either moving the mouse or > by pressing any key on the keyboard. In my program I'm trying to resume the > system by using WM_TIMER. In the program I'm setting the timer to go off > after 1 minute. When my program receives the WM_TIMER message I use > ::mouse_event() to synthesize a mouse move. This should resume my system but > it doesn't. The reason being, once you suspend the system the program > doesn't receive any WM_TIMER message. > > The main objective behind this program is to be able to suspend the system > and then later resume it at time specified by the user of the program. > > Is there a way in which I can do this using SDK,C++,VC++ or assembly > language. > > > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads