[vlc-devel] Re: Bug in activex: connectionpoint.h line 44

Jacob Lewallen jlewalle at cs.ucr.edu
Sun Jul 16 01:40:08 CEST 2006


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:

    *pdwCookie = cd.dwCookie = _connections.size() + 1;

And then put

pdwCookie--;

at the top of Unadvise. This makes things much friendly under .NET.

jacob


On 7/15/06, Jacob Lewallen <jlewalle at cs.ucr.edu> wrote:
>
> 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:
>
> connectionpoint.h, line 44:
>
>  if( (IID_IUnknown == riid)
>    && (IID_IConnectionPoint == riid) ) {
>
> 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)
>
> 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.
>
> jacob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20060715/dd6d46bf/attachment.html>


More information about the vlc-devel mailing list