can anyone tell me how screensaver works while windows is locked. what are the win32 api methods that are used.
2 Answers
The only knobs you have are LockWorkStation() to lock the workstation and SystemParametersInfo(), SPI_SETSCREENSAVEACTIVE to activate the screen saver. Everything else, switching the desktop, looking up the selected screen saver, loading and starting it is buried inside Windows. I'd guess at crss.exe. Your question is too vague to offer help beyond this.
Do you want to implement a screen saver or do you know how the screen saver can run while the machine is locked? On XP there is a separate desktop for this, which gets activated by the GINA (a DLL running in the winlogon process) when the machine is locked.
To implement a screen saver, implement ScreenSaverConfigureDialog
and ScreenSaverProc
according to the specifications over at MSDN, export those functions under these names (i.e. use a .def file to have the names without decoration) and name the created DLL .scr afterwards.