Defrag Tools #150 - Media eXperience Analyzer part 2: Video Playback Power Saving

Play Defrag Tools #150 - Media eXperience Analyzer part 2: Video Playback Power Saving

The Discussion

  • User profile image
    Gary Harper

    This is an interesting video. I am curious to know what technology was used to write the XA application. C# WPF? Any C++?

  • User profile image

    Hi Gary,

    The MXA engine is C++, DirectX, and GDI.  MXA has a C++ managed wrapper and C# WPF UI.  Let us know if you have any more questions!


  • User profile image
    Gary Harper

    Hi Jorge,
    Thank you for answering my question. I would be very interested in learning how the C++ DirectX and GDI portions are brought forward and displayed within the managed visual layer. I have a desktop application that is completely unrelated but has some similar visual features, like a timeline with lots of graphical content. It is MFC based right and am interested in alternative approaches. Not sure if it is possible to pick your brain for a few minutes offline but if so please let me know.

  • User profile image

    HI Gary,

             DirectX is used when the tool is local and GDI when used over remote desktop.

    To display the DX Surface on C# we use D3DImage, note that you need to implement your rendering function where you handle the update of The D3DImage. something like

    // Get the pointer to Dx surface on c++
    IntPtr pSurface = WrapperTo YourC++Class.GetSurface();
    if (pSurface != IntPtr.Zero)
         m_d3dimage.SetBackBuffer(D3DResourceType.IDirect3DSurface9, pSurface);

         WrapperTo YourC++Class.Render();

         m_d3dimage.AddDirtyRect(new Int32Rect(0,

    msdn has this sample

    if you Bing "D3DImage c++ sample" you will get several other useful hits,

    Let me know if that helps,




  • User profile image
    Gary H


    Thank you for posting the above information. It is definitely helpful.


  • User profile image

    for those of us that would like to try the Media Analyzer tool... could you please make the "demo" driver tool (evntctrl.exe) available for download... thanks

  • User profile image

    @Tom: We had another request for that, and we're checking into it, but unfortunately I don't think we'll be able to release that tool at this time. We'll mention it on the show if this changes.

Add Your 2 Cents