It requires a bit of trickery. First, you need to create a Bitmap in memory, get the DC, and all of that. Then, you need to lock the back buffer, and read the values from the buffer, and copy them into your Memory Bitmap. Then you just save that image, unlock the back buffer, and continue.

You could also render the frame to a Texture. I believe that there is a D3DX function for saving texture to disk.

Z.