Learn how to a build a cloud-first strategyRegister Now


get screen grab of Winlogon desktop

Posted on 2006-04-11
Medium Priority
Last Modified: 2009-07-29
Hi guys, there are tonnes of examples of how to capture the current desktop to a bitmap etc, but I also want to capture the ctrl+alt+del options and the workstation locked screen, my app is running as a local service and I have successfully accessed the Winlogon desktop for the purpose of simulating a ctrl+alt+del and can use the mouse and keyboard on this desktop but I cannot access it for the purpose of storing in a bitmap.

This is for a remote access app I have been working on and this is the final peace to the very large puzzle, it's not in the box, I have looked, any one know where it is? :P

I know it is probably tempting to say "it's not possible for security reasons" but I have read that so many times and have managed to get this far, other remote apps can do it and I bet it is pretty simple when you know how so hoping someone does!

Thanks in advance,

Question by:JustinWillis
  • 2
LVL 17

Accepted Solution

TheRealLoki earned 1500 total points
ID: 16432299
I don't know how to do this, but here's some ideas
Is the issue that it is the "Local System's desktop" and not the "current logged on user's desktop"
You know how you can do a CreateDesktop() and have "hidden desktops" and switch between them if you like. Maybe it's like this.
Perhaps an OpenDesktop(), or some API to "Get specific desktop's handle" would allow you to see it and bitblt or copy it ? [shrug] just guessing :-)

Author Comment

ID: 16434218
Yes that is how I have currently accessed the Winlogon Desktop but I have done so in an Indy Thread to satisfy the security, I use to use...

  dc: HDC; lpPal : PLOGPALETTE;
{get the screen dc}
  dc := GetDc(GetDesktopWindow);

But I think GetDesktopWindow may be the wrong thing to be using as i does not seem to be successful, I may be wrong though, maybe another reason it is failing, have not finished testing it to confirm.

Cheers for interest and help in previous question.


Author Comment

ID: 16436265
After some testing I think I have found what I have done wrong, TheRealLoki your message got me checking the OpenDesktop() code which was indeed at fault, was not taking the screen grab while winlogon desktop had focus, sounds like a stupid mistake to make but handling another thread in the service makes this a little trickier :P

Cheers for your help.


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question