Hi, this used to work on Windows 7 64, but doesn't on Windows 10 64:
Func _isWorkstationLocked()
$hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", 0x100)
$ret = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0])
DllCall("User32.dll", "int", "CloseDesktop", "int", $ret[0])
If $ret[0] Then
Return SetError(0, 0, 0)
Else
Return SetError(0, 0, 1)
Hi, this used to work on Windows 7 64, but doesn't on Windows 10 64:
Func _isWorkstationLocked()
$hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", 0x100)
$ret = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0])
DllCall("User32.dll", "int", "CloseDesktop", "int", $ret[0])
If $ret[0] Then
Return SetError(0, 0, 0)
Else
Return SetError(0, 0, 1)