title: Call C# event with PHP
body: <p>I tried connecting DLL with php using <strong>COM</strong></p>
  
  <p>I am able to call dll functions using php. But i'm not able to receive events.</p>
  
  <p>Tried using com_event_sink($obj,$sink,$interface), not working. </p>
  
  <p>Here is my code </p>
  
  <pre><code>class IEEventSinker 
  {
  
      var $terminated = false;
  
      function C_AllDataAreLoaded(){
          echo "user logged in";
          $terminated=true;
      }
      function ConnectionState($connected)
      {
          $terminated=true;
          if($connected)
          echo "connected";
          else
          echo "not connected";
      }
  
  }
  
  $obj=new COM("VertexFXBOAPI10.CVertexFXBOAPI") or die("Unable to include the dll");
  $sink = new IEEventSinker();
  com_event_sink($obj, $sink, "VertexFXBOAPI10.__CVertexFXBOAPI_Event");
  
  $obj-&gt;SetLoginInfo(UNAME, PASSWORD, IP, PORT);
  
  while(!$sink-&gt;terminated) {
      com_message_pump(1000);
  }
  </code></pre>
  
  <p>the login function callbacks a C_AllDataAreLoaded function login completed.</p>
  
  <p>Is very helpful if you can solve this issue.</p>