views:

175

answers:

2

I have a windows application that scrapes pixels from the screen for recording (in the form of a video) to a custom screen-sharing format. The problem is that on machines using a software cursor, blitting from the screen with SRCCOPY|CAPTUREBLIT (so that layered windows also show up in the image) causes the cursor to blink, as described in Case of the Disappearing Cursor.

For single screen shots, this is not a problem, but when multiple screen shots are taken in rapid succession, the cursor blinks so fast that it sometimes seems to disappear altogether.

I have looked into using the Windows Media Encoder SDK (as described in a codeproject article, see below) because it doesn't cause the cursor to blink, but there seems to be no way to directly access the frame data. Unfortunately, both real-time encoding and the custom format are both requirements, which makes windows Media Encoder unusable for this purpose.

I have also tried the DirectX way (described in the same article, see below), and it seems to suffer from the same problem.

Has anyone else run into this problem? There must be a way around it - many commercial screen sharing programs have no such problem.

article: www.codeproject.com/KB/dialog/screencap.aspx

A: 

What about using a mirror driver?

Anders
A: 

You are right, a mirror would certainly work. However, at the moment, I am trying to stay away from that approach because of the security and permissions concerns when installing under a user without admin rights. Correct me if I am wrong, but I don't think there is any way to install a driver without such rights. Besides that, it seems that that would be needlessly complex: there should be a simpler / less invasive way to do this. (I should have mentioned this in my original question)

Joshua Warner
Certainly there is no way to install a driver without administrative rights; if you have the SeLoadDriver privilege, you could load a driver that would add your user to the Administrators group!
SamB