We can find if a network machine is up or not using ping, but what if I want to know the locked status of the desktop ?
Is there any tool or windows API or a work around to find this ?
Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!
Call OpenInputDesktop with the access mask set to
(DESKTOP_ENUMERATE | DESKTOP_READOBJECTS). If the call
fails you're on the WinLogon desktop. (If you need to)
call GetUserObjectInformation to retrieve the UOI_NAME
value, which will be 'Default' for the normal desktop
or 'Screen-saver' for the screen saver.
You may be able to wait on the desktop handle if it gets
signalled when the 'focus' changes; again, not tried.
Otherwise poll in a 2 or 3 second loop.
HTH, John Bates.
0 members, 0 guests, 0 anonymous users
Community Forum Software by IP.Board
Licensed to: Geeks to Go, Inc.