I found another that other bug in connectionpoint.cpp, it's a little less obvious. In Advise, there's a "cookie" out parameter that returns an identifier that can later be passed to Unadvise. In the current implementation it's set to the value of _connection.size(), only thing is on the first call that's 0. Under .NET, there's a ConnectionPointCookie class that calls this and uses a value of '0' to be uninitialized/error. So I changed it the code to:
<br><br>    *pdwCookie = cd.dwCookie = _connections.size() + 1;<br><br>And then put<br><br>pdwCookie--; <br><br>at the top of Unadvise. This makes things much friendly under .NET.<br><br>jacob<br><br><br><div><span class="gmail_quote">
On 7/15/06, <b class="gmail_sendername">Jacob Lewallen</b> <<a href="mailto:jlewalle@cs.ucr.edu">jlewalle@cs.ucr.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hey all I've been trying depsarately to get the activex working nicely under .NET, everything seems great except for the events. I've got a few problems, one of which I've been able to track down:<br><br>connectionpoint.h
, line 44:
<br><br> if( (IID_IUnknown == riid)<br>   && (IID_IConnectionPoint == riid) ) {<br> <br>I'm fairly certain the && is a bug, and should be ||. I've been doing all my compiling/testing with 0.8.5, but this is also in the trunk revision (trunk crashes on me when I use my compiled activex)
<br><br>Things work *much better* with that change made for me in the event department. I'm still investigating another possible bug related to this but is much more wiley.<br></div><div><span class="sg"><br>jacob<br>

</span></div></blockquote></div><br>