can anyone tell me how screensaver works while windows is locked. what are the win32 api methods that are used.
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.