C coding for Screenshot capture

Hey guys,

I'm for C code that can do screen capture for me.
Any help.

Thanks.

What OS? what window system?

This is not a homework question, is it?

I really doubt it, since screenshotting isn't a trivial thing to do...

Hi,
I'm supposed to write a program in C that can capture the login screen of a Windows OS.

The OS is Windows XP.

First off, you're asking in the wrong forum since Windows is not UNIX. Second, you're going to have a very hard time doing so since that would mean arranging to have your program run before a login occurs...

Thanks for your advice.I guess its a little complicated,but can you give me an idea on how it can be achieved atleast.

Thanks...

:slight_smile:

The system needs an username and password to check for write/read/execute permissions, if you want to run a program to make a screenshot of a login screen BEFORE the login occurs, as corona688 says, i don't think it's possible.

But in Windows, there's an account that doesn't have any restrictions on the system, it would be Windows "root" user, it's name is SYSTEM, it's responsible to initialize all the services in the system and some other things, SYSTEM user is superior than the Administrator one.

You can configure a program to run BEFORE the login occurs by telling the SYSTEM account to execute it, this can be done with the gpedit.msc program.

Go to Start -> Run... -> type gpedit.msc and click OK

On the Group Policy console, get into Computer Configuration -> Windows Settings -> Scripts (Startup/Shutdown) -> Startup and double click on it, in the new window select the path to the program you want to run before logging in (the screenshot app) and restart your system.

With the program, i cannot help you, this is a UNIX/Linux forum, and Windows is a different operating system, which opperates in a different way.

If you were on an UNIX system, i would tell you to do a simple `cat /dev/fb0 > image.raw` to capture the screen, and a `cat image.raw > /dev/fb0` to view what you've captured. Obviously this wont work on Windows. By the way, in an UNIX system, it is impossible to do anything without logging on.