Capture my application (Xaml & D3D interop) screen RRS feed

  • Question

  • Hi,

         I'm developing an XAML & D3D interoped store application, and want to capture my application's screen content (the final output). 

         I searched around and found out how to capture my application's D3D content (does not contain XAML content), and also found out how to render XAML to bitmap (does not contain D3D content), but how can I get the merged output?  

        Here are the ways I've tried and none of the works: 

        1.  IDXGISurface1->GetDC and try to save DC as bitmap. 

             GetDC succeed but it seems other APIs(such as Bitblt) needed for saving HDC to bitmap are for desktop apps only. 

        2.  IDXGIOutput1->GetDisplaySurfaceData1

             The API call failed with an error message " This function can only be called if TakeOwnership has been called." 

        3. I've also checked out the sample project here: 


            But it seems only the SurfaceImageSource content can be saved, still it does not contain the XAML content. 

        I've been stuck here for more than 2 weeks, please anybody kindly help.

        Appreciated it very much!



    Tuesday, June 3, 2014 6:30 AM


  • You'll need to capture them separately and then composite the images yourself. There isn't an API that can capture both layers simultaneously.
    • Marked as answer by Anne Jing Thursday, June 12, 2014 6:18 AM
    Tuesday, June 3, 2014 1:51 PM