Get console buffer contents in C

Just wondering if there is any way (in C) to get the contents of the console buffer, preferably as some kind of char array. It is going to be written to a file, so if I am missing out on something stupid that will do exactly that, then point it out. It can be Windows-specific. I am using MinGW (gcc 3.4.5).

Thanks in advance.

Answers


I think you need to take a look at win32 console functions for example GetStdHandle(), ReadConsoleOutput(), WriteConsoleOutput etc.


Need Your Help

PHP File Upload: Syntax?

php html mysql file-upload server-side

I am currently creating a system where a user can upload both information a corresponding picture to a db. However, when I call the move_upload_file() function, it is not liking my syntax when spec...