locked
Capture my application (Xaml & D3D interop) screen

    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: 

            http://code.msdn.microsoft.com/windowsapps/How-to-save-SurfaceImageSou-8668a455

            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!

    Thanks, 

    Ruwei

    Tuesday, June 03, 2014 6:30 AM

Answers

  • You'll need to capture them separately and then composite the images yourself. There isn't an API that can capture both layers simultaneously.
    Tuesday, June 03, 2014 1:51 PM
    Owner