C# callback crashes in c++ RRS feed

  • Question

  • Hi,

     In c++ I am calling C# com dll function which in turns calls call backs. The c# com dll is retrieving Lync client presence.

    If there is any change in lync client presence, the c# callbacks will be triggered automatically. This crashing the application since both c++ and c# code are trying to execute at the same time.

    As of now I am not using marshalling and delegate concept in my application. Whether I need use marshalling and delegate concept  and how to use it in this case.

    Please help me this problem.

    Friday, June 14, 2013 3:00 PM


  • First check the Control Panel - Adminstrative Tools - Event viewer to se if there are any error slisted to help solve this problem.  The C# code is running like any process and windows Events is taking care of the Callback.  I think you are having one of two problems

    1) The size of the variables being passed from C++ to C# are the wrong size or need to be in global memory space.  Not local.

    2) You have a multi-thread application and C# does some additional checking to prevent more than one thread accessing common variables at the same time.


    Friday, June 14, 2013 4:17 PM