Screenshot from a XP / 2000 service program
Posted on 2006-11-05
I need to take a screenshot FROM A XP/2000 SERVICE. When I take the screenshot from a normal program it works fine (using any of the differents codes available in internet), but using that code from a service program is not working (I only get a white screen).
Not sure if it helps, but:
I'm using getdc(0) to get the desktop handle; looking code written in C, I notice that a working code use getdc(null), but I cannot use that in delphi because it generates an "could not convert variant of type (Null) into type (int64)" error.
As far as I can imagine, my problem is that I get the handle to the current user desktop, not the "real" desktop, so the function called from a regular application works well, but from a service program (system user) it fails...
Remember, take a normal screenshot from a normal application is not the problem, but using the same code in a xp/2000 service application.
Thanks in advance...
ps. sorry for my bad english