PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Windows API: Event beim locken des Bildschirms?


PatkIllA
2007-08-05, 11:17:24
Ich bin nicht sicher ob der Begriff richtig ist, aber ich möchte mitbekommen, wenn der Bildschirm gelockt wird.
Damit meine ich einmal, wenn der Rechner gesperrt ist und das andere mal, wenn ich Strg+Alt+Entf drücke und dieses Auswahlmenü erscheint.
http://www3.georgetown.edu/uis/images/software/documentation/win2000nonovell/NONWCAD.JPG

Für ersteres gibt es WTSRegisterSessionNotification (https://msdn2.microsoft.com/en-us/library/aa383841.aspx) aber für das zweite fällt mir nichts geschickteres als ein Keylogger ein.
Wenn jemand noch Hinweise zu irgendwelchen Eigenheiten bei aktivierter Benutzerumschaltung hat, kann er das auch gerne posten.

Juerg
2007-08-06, 11:05:39
The SAS window shows the default login dialog when it gets a WM_HOTKEY message with parameters indicating VK_DELETE and both the Ctrl and Alt key pressed down. This hotkey is registered by winlogon.exe during the system startup, so you have no way to register it yourself. However, you can subclass the SAS window and handle it before the SAS window dispatches it.

If Terminal service is installed, and multiple users logged in, the program needs to decide which WinLogon process should be injected. This can be done by enumerating processes and looking for the current session ID and the executable path. This step can be safely removed if the program will not run under Windows 2000 Server or Windows XP with fast user switch.

Trap CtrlAltDel; Hide Application in Task List on Win2000/XP
By JIANG, Sheng[MVP].
http://www.codeproject.com/system/preventclose.asp?df=100&forumid=15200&exp=0&select=1611270


Lock Windows Desktop
By Antnio Feijo.
http://www.codeproject.com/win32/AntonioWinLock.asp