473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Screen Capture Using C

Hello All,
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:

PixMap pixMap;
GetQDGlobalsScreenBits((BitMap*)&pixMap);

I would like to be able to grab the screen image from a windows based
machine and a unix based machine. I can find the code for C++,
however, I am unable to find the technique that works in C. I realize
that this is platform specific, but I have not been able to find an
appropriate group to post this question to other then this group. If
anyone knows of a group that could provide the answer or of some place
where I can find decent documentation on C I would greatly appreciate
it.
Best, Andrew

Nov 14 '05 #1
7 4248
On 11 Apr 2005 14:48:23 -0700, in comp.lang.c , al****@psu.edu wrote:
Hello All,
I recognize that this question has already brought about some debate
has it...
I would like to be able to grab the screen image from a windows based
machine and a unix based machine.
To do this, ask in comp.unix.programmer and a windows programming
group. You can't do this in standard C, it is by definition
implementation specific.
. I realize
that this is platform specific, but I have not been able to find an
appropriate group to post this question to other then this group.
Frankly, rec.motorcycles is no less appropriate....
If anyone knows of a group


see my first comment above.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #2
> I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:


Under UNIX, you cannot guarantee that there is a screen (on an
ASR-33 teletype?), or that there are pixels (character-based terminals
such as VT-52 and VT-100 and emulators thereof are common). And
you can't guarantee being able to read back what is on the screen
in any case. The screen, if there is one, may well be connected
to a machine miles (or thousands of miles) away from the one running
the program, and there may be no protocol to ask for a screen dump
from it.

Gordon L. Burditt
Nov 14 '05 #3
In article <11*************@corp.supernews.com>,
Gordon Burditt <go****@hammy.burditt.org> wrote:
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:
Under UNIX, you cannot guarantee that there is a screen (on an
ASR-33 teletype?), or that there are pixels (character-based terminals
such as VT-52 and VT-100 and emulators thereof are common).


True, and everything you said -also- applies to OSX, as one can telnet
or rlogin or ssh in to an OSX machine [which is unix underneath
the dressings.]
--
Would you buy a used bit from this man??
Nov 14 '05 #4
al****@psu.edu writes:
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:

PixMap pixMap;
GetQDGlobalsScreenBits((BitMap*)&pixMap);
I don't know what PixMap and BitMap are, but if GetQDGlobalsScreenBits
reads data into a BitMap, why not declare a BitMap rather than a
PixMap? Casts are rarely necessary; they're often an indication that
something should be of the correct type in the first place.
I would like to be able to grab the screen image from a windows based
machine and a unix based machine. I can find the code for C++,
however, I am unable to find the technique that works in C. I realize
that this is platform specific, but I have not been able to find an
appropriate group to post this question to other then this group. If
anyone knows of a group that could provide the answer or of some place
where I can find decent documentation on C I would greatly appreciate
it.


This is *extremly* platform specific. As far as C is concerned, there
may not even be such a thing as a "screen image"; even if there is, it
may not be accessible. The best you can do is write something that
will work in some environments under some circumstances.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #5
On 11 Apr 2005 22:41:48 GMT, in comp.lang.c ,
ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
In article <11*************@corp.supernews.com>,
Gordon Burditt <go****@hammy.burditt.org> wrote:
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:

Under UNIX, you cannot guarantee that there is a screen (on an
ASR-33 teletype?), or that there are pixels (character-based terminals
such as VT-52 and VT-100 and emulators thereof are common).


True, and everything you said -also- applies to OSX, as one can telnet
or rlogin or ssh in to an OSX machine [which is unix underneath
the dressings.]


and Windows, for what its worth. And PalmOS, bizarrely, tho its more
common to use a Palm handheld to telnet in to a unix server.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #6

<al****@psu.edu> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello All,
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:

PixMap pixMap;
GetQDGlobalsScreenBits((BitMap*)&pixMap);

I would like to be able to grab the screen image from a windows based
machine and a unix based machine. I can find the code for C++,
however, I am unable to find the technique that works in C. I realize
that this is platform specific, but I have not been able to find an
appropriate group to post this question to other then this group. If
anyone knows of a group that could provide the answer or of some place
where I can find decent documentation on C I would greatly appreciate
it.
Best, Andrew


Since this is off topic.
If you do not find a better answer send me an e-mail and I can show you how
to do it, in the old fashioned Windows API.

Barry
Nov 14 '05 #7

<al****@psu.edu> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello All,
I recognize that this question has already brought about some debate
so I am going to ask as a specific question as I can. I am currently
try to create a cross platfrom screen parser in C. I was able to find
C code that grabs the pointer to the array of screen pixels in memory
for the OS X platform:

PixMap pixMap;
GetQDGlobalsScreenBits((BitMap*)&pixMap);

I would like to be able to grab the screen image from a windows based
machine and a unix based machine. I can find the code for C++,
however, I am unable to find the technique that works in C. I realize
that this is platform specific, but I have not been able to find an
appropriate group to post this question to other then this group. If
anyone knows of a group that could provide the answer or of some place
where I can find decent documentation on C I would greatly appreciate
it.
Best, Andrew


Still off topic, I believe I still have the source code to copy the screen
from the game TriPeaks and play it forever, although I think I hard coded
(oops) some of the screen dimensions. I wrote it long ago to play with
moving a mouse and clicking buttons in the Windows API. It does some
minimal pixel analysis and game logic as well and may be a good sample.

Barry
ba****@highstream.net
Nov 14 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
5
by: TerryWilson | last post by:
I am developing a web based service tool using asp.net that we will distribute with our product. This service tool will be used for remotely configuring the product, problem determination, etc. ...
1
by: Jody Gelowitz | last post by:
I have seen some examples of how to capture a color from a point on screen using C#, but haven't come across anything with VB.NET. Is this possible under VB.NET? I know that I will need to use...
2
by: Eddie Dunn | last post by:
I have one here that I cannot find anything on in my searching. I am implementing a screen capture functionality into my Visual Basic ..NET application. The code I am using calls the bitblt...
4
by: gwhite1 | last post by:
I use this code to capture a screen in a regular VB 2005 windows app. It works great! I found the code in google. But when I create a windows service it does not capture the screen. It only...
2
by: dumbledad | last post by:
Hi All, I'm using ASP.Net web services to provide the logic required for a Flash based prototype. The Flash and the ASP .Net run together on the client machine. One of the functions I'd like to...
1
by: JP2006 | last post by:
I'm trying to write a control that will take a screen capture of a particular website when a user submits a form in a web application; one of the form fields is for a URL - the control needs to get...
5
Atran
by: Atran | last post by:
Hello Everyone. In this article: You will know to capture the screen in 2 ways: 1)- Capture full screen. 2)- Capture region. Let's Begin: First make a new Windows Application project. And...
3
by: dolittle | last post by:
Hi, I want to create a screen capture using java. I'm new to java and I'm overwhelmed by the so many terms: SE, EE, FX, Swing... I saw a nice product written in java that let you start the...
2
by: raylopez99 | last post by:
Beware newbies: I spent a day before I figured this out: copying a bitmap (image) file to file is not quite like copying a text file--you have to do some tricks (see below), like using a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.