Sign in to follow this  
Followers 0

Need help detecting desktop lock

1 post in this topic

#1 ·  Posted (edited)

Currently I'm using

Func _GetDesktopLock()
    Local $fIsLocked = False
    Local Const $hDesktop = _WinAPI_OpenDesktop('Default', $DESKTOP_SWITCHDESKTOP)
    If @error = 0 Then
        $fIsLocked = Not _WinAPI_SwitchDesktop($hDesktop)
    Return $fIsLocked
EndFunc   ;==>_GetDesktopLock

that I found from @guinness in another thread, However this seems to have a issue whenever UAC pops up as it'll return true. Is there some way to fix this?

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0