xp、win7下如何取消屏保、取消电源管理
2011.12.11整理烛秋
一、网络上流传的方法
网络上流传的方法很多,也很复杂。之前在实现这个功能的时候在网络上寻找了很多,如下:
http://blog.iyunv.com/rainharder/article/details/6101317
http://topic.iyunv.com/t/20021009/15/1081843.html#r_7006146
http://topic.iyunv.com/u/20100414/12/A5265E43-6288-43A0-B337-C5DA0CF1D7DD.html#r_64661983
http://topic.iyunv.com/u/20100203/12/6B7E7AF7-D5DA-4BA5-A6EF-8A38866B4C1B.html#r_63377844
http://topic.iyunv.com/u/20080603/17/5EBACC7D-5F96-4A29-AD7C-55FD8F47CD45.html
http://topic.iyunv.com/u/20100203/12/6b7e7af7-d5da-4ba5-a6ef-8a38866b4c1b.html
一些代码试了之后发现很多并没有实现功能。譬如下面的代码:
static UINT dss_GetList[] = { SPI_GETLOWPOWERTIMEOUT,
SPI_GETPOWEROFFTIMEOUT, SPI_GETSCREENSAVETIMEOUT };
static UINT dss_SetList[] = { SPI_SETLOWPOWERTIMEOUT,
SPI_SETPOWEROFFTIMEOUT, SPI_SETSCREENSAVETIMEOUT };
m_pValue = new int;
for (int x = 0; x < dss_ListCount; x++)
{
SystemParametersInfo(dss_GetList, 0, &m_pValue, 0);
SystemParametersInfo(dss_SetList, 0, NULL, 0);
}
和
for (int x = 0; x
页:
[1]