Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API for getting screen region changes?

I am writing a sort of screen-recording app for Windows and wish to know when and which regions of the screen/active window have changed.

Is there a Windows API I can hook to get notified of screen changes?

Or would I need to manually write something like this? :(

I always figured that Remote Desktop used some sort of API to detect what regions of the screen had changed and only sent back those images - this is exactly the behavior that I need.

like image 691
CodeAndCats Avatar asked Nov 11 '08 12:11

CodeAndCats


2 Answers

I don't think there is an API in Windows that can tell you which parts of the screen have changed.

One possible way is using a video mirror driver like UltraVNC uses.

like image 79
Otherside Avatar answered Nov 16 '22 04:11

Otherside


It would seem that you're going to have to do a fair bit of work to detect screen changes. This posting at tech-archive.net for instance. With this you can copy to RAM a reference screen and then take another and compare the two. It'd be up to you to define what kind of a change is a meaningful one. It's similar material to this article on desktop capture.

like image 4
bugmagnet Avatar answered Nov 16 '22 06:11

bugmagnet