PDA

View Full Version : using SystemParametersInfo



bastek1604
10th April 2010, 22:09
Hey!
In my app i want to use SPI_SCREENSAVERRUNNING from SystemParametersInfo to active screen saver
My code:

bool OldState=1;
bool ok;
#if defined(Q_WS_WIN)

ok=SystemParametersInfo(97, TRUE, &OldState, 0);
QMessageBox::about(parent, "tytul", QString(ok?"T":"F"));
#endif


In MessageBox I checking that screen saver is running but i still get "F" - False
What i do wrong because i want to lock all shortkeys ex. alt+tab, alt+ctrl+delete
Thank you in advance for your help
Sory for my english

squidge
10th April 2010, 23:08
Why not ask GetLastError for the reason?

bastek1604
11th April 2010, 00:20
there is any error from GetLastError. I would like to know there is any possibility to lock screen using SystemParametersInfo on windows xp and 2000 because i'm not sure that it is working on windows nt operating system

squidge
11th April 2010, 08:49
Requirements

Minimum supported client
Windows 2000 Professional

bastek1604
11th April 2010, 13:16
I'm testing it on windows xp and windows 2003 server

squidge
11th April 2010, 22:43
Above you said Windows NT OS, which is not supported. On Windows XP and 2003 server, it should work as expected.