locked
How to add completed handler for BitmapEncoder.FlushAsync

Answers

  • FlushAsync returns a IAsyncAction and not an IAsyncOperation.

    You might want to try something like:

    auto enc = ref new Windows::Graphics::Imaging::BitmapEncoder;
    auto flushOp = enc->FlushAsync();
    
    flushOp->Completed = ref new AsyncActionCompletedHandler([](IAsyncAction ^action)
    {
    });
    

    Friday, October 14, 2011 5:49 PM

All replies

  • FlushAsync returns a IAsyncAction and not an IAsyncOperation.

    You might want to try something like:

    auto enc = ref new Windows::Graphics::Imaging::BitmapEncoder;
    auto flushOp = enc->FlushAsync();
    
    flushOp->Completed = ref new AsyncActionCompletedHandler([](IAsyncAction ^action)
    {
    });
    

    Friday, October 14, 2011 5:49 PM
  • Thanks Raman, it worked.
    Friday, October 14, 2011 7:24 PM