title: Problem with triggering Events in a .NET DLL via COM from Delphi
body: <p>i have a problem with COM objects and triggering events. I have:</p>
  
  <ul>
  <li>a DLL written in C#.NET (3.5), which triggers events</li>
  <li>an application in Delphi5, which uses the DLL as a COM object.</li>
  </ul>
  
  <p>So far so good. Events go like this:
  - in the DLL there are 2 events. One is internal and is not COM-visible. The second one is external and is visible by COM
  - there is also a OnChanged function in the DLL, which is connected to the internal event and triggers the external event. So basically everytime the internal event is trigger, so is the external event.
  - this OnChanged function is also COM-visible and can be called from the Delphi app</p>
  
  <p>I used <a href="https://stackoverflow.com/questions/2867582/exposing-c-com-server-events-to-delphi-client-applications">this solution</a> to get the whole thing working, I can successfully bind a Delphi procedure to the .NET event, but there's a catch:
  - if I call OnChanged from the Delphi app, everything's peachy - the binded Delphi function will get executed as well as (obviously) the .NET function
  - if the DLL calls OnChanged from a callback function in .NET, the binded Delphi function will NOT get executed.</p>
  
  <p>Bottomline: if I trigger the external event from Delphi, everything is OK. If the DLL triggers the internal event, nothing will happen in Delphi (although for sure the external event is triggered).</p>
  
  <p>Any ideas are highly appreciated!</p>