How to switch off (or switch to stand-by mode) HDD and monitor with code
Posted on 2003-09-30 00:20:55 by optimus

How to switch off (or switch to stand-by mode) HDD and monitor with code


the way of manipulating the monitor is by using WM_SYSCOMMAND. (written in c lang)
turn on => SendMessage(NULL, WM_SYSCOMMAND, SC_MONITORPOWER, -1);
turn off => SendMessage(NULL, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
stand-by => SendMessage(NULL, WM_SYSCOMMAND, SC_MONITORPOWER, 1);

however..
there is no way to alternate the hdd power states at API level, as i know.
but i think... you can change this states by power management APIs.
because all device drivers in Windows have their own power management routine for processing those requestes.
therefore, check out the power management functions that can change the system's power states in MSDN.


Regards..
Posted on 2003-09-30 11:59:27 by Yeori
very strong! :)
Posted on 2003-09-30 13:40:17 by optimus