https://github.com/rdp/open-source-directshow-screen-desktop-capture-source-filter (my own, shameless plug–open source! works!)
derived from http://stackoverflow.com/questions/4214786/directshow-source-filter-using-dekstop-window-as-source
Also http://tmhare.mvps.org/downloads.htm has some examples/samples of directshow screen capture. Except it might need some work. Within the “Filter Graph Library” demo.
Pingback: list of available directshow screen capture filters « Roger's woze
I would probably rewrite his “capture source filter” to do screen grabbing…
for now just live with the existing commercial ones:
http://betterlogic.com/roger/?p=3059
I might need my own, though, eventually, in order to be able to get the screen coordinates just right?
also see
http://betterlogic.com/roger/?p=3037 “fast screen capture” for some ideas on how to build a new one that is fast
http://github.com/rdp/directshow-demo-audio-input-source has a copy of the source (builds with VS Express I think) in vcam
looks like the windows SDK samples\…\push desktop source is another high quality open source source desktop capture filter…