title: Need help with events in COM in pure C++!
body: <p>guys! Very important question:</p>
  
  <p>Please, look at <a href="http://astdatalife.ru/ni_portfolio.zip" rel="nofollow noreferrer">my project (300Kb)</a>. I can`t use MFC/ATL, pure C++ only.</p>
  
  <p>I have COM library (niapi.dll), but no sources/headers available, dll only.</p>
  
  <p>There is class for connecting to server (NiApi::SrvrSession), class has login event handler (NiApi::SrvrSession::OnLogin).</p>
  
  <p>I used</p>
  
  <pre><code>#import "NiApi.dll"
  </code></pre>
  
  <p>to generate wrappers/information,</p>
  
  <p>then</p>
  
  <pre><code>ISrvrSessionPtr session(L"NiApi.SrvrSession");
  </code></pre>
  
  <p>to create object, then trying</p>
  
  <pre><code>session-&gt;put_OnLogin();
  </code></pre>
  
  <p>to assign events, but there is no one put_On or such member.</p>
  
  <p>niapi.tlh have _ISrvrSessionEvents struct inside, but it have no relations with SrvrSession.</p>
  
  <p>I need to use events from NiApi::SrvrSession for handling connection status.</p>
  
  <p>Please help or my boss kill me! (sorry for broken english, I read better than speak;)</p>