I found a very good tutorial on this page: http://www.aishack.in/2010/03/captur...-with-directx/