I have an application that takes screenshots from the local computer.
This works since many years correctly until suddenly a colleague reported me that he got an "The handle is invalid" error from my application.

This error came from inside the .NET framework from `Graphics.CopyFromScreen()`.

To work around this I replaced this function with C++ code using `GetDC(GetDesktopWindow())` / `GetDC(NULL)` and `BitBlt()` to copy the screen into a bitmap. Now I got `ERROR_INVALID_HANDLE`.

This happens on Windows 7.

What is going on there ?
I can not investigate this problem on my own because I cannot reproduce it and my colleague is in another country.

I searched in Google and lots of people report this error.
But all posts that I found were from people who tried to take a screenshot from a client computer through ASP code on a server. I don't understand how people can have the strange desire to capture the client's computer from a website. It is obvious that this will not work.

But I could not find one single case where someone reports this problem from an application that cannot capture the screen of the SAME computer in the SAME session where the application itself is running.