views:

606

answers:

4

I'm ready to outsource the screen capture functionality of our application, because it's not our core business and I've spent too much time trying to get our code to do all the things I need. Time for a specialist, I think. My requirements, in decreasing order of importance, are below. Does anyone have experience with any commercial or free libraries that meet most or all of these requirements?

  1. Has to work in Windows XP and higher. (But not Win95/98/Me.)

  2. Visual C++ 2005 compatible, where screenshot can be triggered from my code. Preferably a static library, but a DLL or COM object is OK. I'd prefer not to shell out to a standalone EXE because there are some users that will try to tamper with our application and I think having an obvious separate screenshot EXE makes that too easy.

  3. Must be able to take full screenshots of multiple monitor systems. (Preferably the way the "Print Screen" key does in Windows, by making a bitmap of the displays stitched together, but if I have to take the pictures separately and combine them myself that's acceptable.)

  4. Must be able to capture screen correctly when Remote Desktop Client (or any RDP client or VM) is in full screen mode. (Of course, it should also work when RDP is in windowed mode, but that shouldn't be a problem as long as it doesn't operate by simulating a key press that might get transmitted to the remote OS instead of being handled locally.)

  5. Must be able to capture screen correctly when Windows Media Player (or any other media player) is in full screen mode.

  6. Must be able to capture screen correctly when game (e.g. World of Warcraft) is in full screen mode.

  7. Would be nice to be able to capture a few seconds of user activity as a video.

A: 

Some people in our office are using Magick++ (an ImageMagick library) to make screenshots. I don't know all the specs, but you could take a look at it and see if it matches your requirements.

Hope this helps.

Regards,

Sebastiaan

Sebastiaan Megens
There is a screen capture function in this library, but it's not clear from the documentation whether it has anything more than basic functionality. If I can't find something more specific to this task, I'll give it a try
jeffm
A: 

I don't know of a library that would do what you want.

If I had to code your requirements, I would probably use the source code of the TightVNC server as my starting point. I think it has the technology to do everything on your list EXCEPT....

I'm not sure that technically there's ANYTHING that can do a screen capture of somebody's Remote Desktop session. Think about it: There can be multiple remote desktop sessions (the csrss.exe process) occuring using the same physical remote desktop server. If you were sitting in front of the machine looking at the video monitor, you wouldn't see anything happening at all. So what woould you expect to capture. VNC is only going to capture what's happening with the "real" video (the non-remote csrss.exe).

Corey Trager
Point taken. I'm only trying to see what the remote desktop client is displaying to the user, which is only a problem when it's in full screen mode.
jeffm
Are you saying you *ALREADY* have a way of running software on the Remote Desktop Server that can record what a given Windows Remote Desktop Client is seeing?
Corey Trager
I don't want to run anything on the RDP server (and couldn't even if I wanted to for various legal and logistical reasons.) I'm just looking for something that programatically does what the "Print Screen" key does, hopefully with the extra items on my wish list. (I'm currently simulating a Print Screen keypress, but that's not reliable and it doesn't work in full screen mode.)
jeffm
Ah, I misunderstood. But I'd still stand by my recommendation of adapting the VNC technology for your purposes.
Corey Trager
+1  A: 

I dont know if this really helps, but the best imaging libraries available are available from

www.accusoft.com and

www.leadtools.com

Both support creatting screenshots, though i don't know, if hey will properly capture movie player output that displays through graphics acceleration or the recording of movies from screen.

RED SOFT ADAIR
Thanks. I'll check accusoft, but I talked to LEADTOOLS and they don't support multiple monitors yet. (Some of the higher numbers on my wish list I could live without, but that one's a dealbreaker.)
jeffm
A: 

If I were you I would investigate WindowsClippings, a pretty mature and extensible application written in C++ that does precisely what you need. It has an API you can extend to your requirements and is pretty cheap at 18$

Conrad
I actually use WindowClippings myself, but since it's a separate app we'd have to pay to license and distribute it which I don't think my boss would go for.
jeffm