locked
App crashes due to continous click of button

    Question

  • Hello Everyone,

    I have a Metro DLL(in C++) having an exported function that returns IAsyncOperation<MyStruct> (MyStruct is a custom structure).

    I consume this function in a C# Metro App. I can obtain the contents of MyStruct in this C# app on a button-click.

    But when I click this button at a rapid rate, the UI of the C# app hangs and it crashes.

    Thanks for any help.

    Thursday, August 2, 2012 9:19 AM

Answers

  • Hello Everyone,

    Just solved the problem!

    The problem was that I was using the default continuation context to run the async functions & their continuations.

    Thanks.

    Thursday, August 2, 2012 9:56 AM

All replies

  • Hello Everyone,

    Just solved the problem!

    The problem was that I was using the default continuation context to run the async functions & their continuations.

    Thanks.

    Thursday, August 2, 2012 9:56 AM
  • Thanks for sharing the solution.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 6, 2012 7:16 AM