Hey, is it possible, to catch the combo of WIN + L (which locks directly the PC)?
It want to do a function before the PC really is locked ... after this i can call another function which locks the pc after that.
have anyone an idea?
i found a reg-hack, but im not able to write this into the registry, so that wont work.
thank you for your help.
Here is another useful function.
Global Const $DESKTOP_SWITCHDESKTOP = 0x0100
Func _IsWorkstationLocked()
Local $Result = False
$hDesktop = DllCall('user32.dll', 'hwnd', 'OpenDesktop', 'str', 'Default', 'int', 0, 'int', 0, 'int', $DESKTOP_SWITCHDESKTOP)
If Not @error Then
$Result = DllCall('user32.dll', 'int', 'SwitchDesktop', 'hwnd', $hDesktop[0])
$Result = Not $Result[0]
DllCall('user32.dll', 'int', 'CloseDesktop', 'hwnd', $hDesktop[0])
EndIf
Return $Result
EndFunc ;==>_