locked
How to use Different Asynchromous Mechanism in WinRT

All replies

  • I am exploring the WinRT and I have developped a sample application for webcam.Which is C++ version of http://code.msdn.microsoft.com/windowsdesktop/Media-Capture-Sample-adf87622/sourcecode?fileId=43837&pathId=1754477665

    Application is working correclty.Now I wondering about these two asynch Handler

    1. AsyncOperationCompletedHandler

    2. AsyncActionCompletedHandler

    My Query is

    1. What is the differnce between these two Handler and on what scenario either of them can be used. 

    2.  How to exit from the handler when the it done. Is Close is Proper way to come out of the handler.

     

     

     


    1. The former returns a result, the latter does not (they use the words operation and action to differentiate those).

    2. Just exit the method. (return)


    http://blog.voidnish.com
    Thursday, November 10, 2011 2:57 PM
  • Also, if you want to abstract away from having to use these handlers, you might want to take a look at PPL Async support.

    And, if you have fully working sample in C++, I would encourage you to submit it to Code Gallery. :)

    Thanks


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    Thursday, November 10, 2011 6:00 PM
  • Thanks Nishant and Raman.

    I will Surely Submit the code Raman.

    Friday, November 11, 2011 5:44 AM
  • I did :)

    http://code.msdn.microsoft.com/Media-Capture-Sample-in-CPP-d78ef2a9

     


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    Saturday, November 19, 2011 3:30 AM