
Signature
Mike
Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
Mike,
There are a number of possible explanations for the symptoms just described:
1. The events are sourced into the C++ ATL COM service. This requires at a
minimum a registration of the outgoing (as seen from the .NET assembly)
interface that is used to sink the events into. If the IID isn't identical
on both sides then you'll never receive events because the interfaces won't
be recognised as being the same. You can define (and register) this outgoing
interface from both sides, but usually you'll want just one side to define &
register it. If that side is .NET, make sure that you're using attributes to
assign it manuall an IID. If you're defining and registering the event
interface from the ATL side, then you must make sure that that components
type library gets registered as well. This is important for any marshalling
that may have to be done (even if everything takes place in-process, you may
still be crossing apartment boundaries and thus need marshalling). Your XP
machine will have this registration because it's done automatically by VS as
you build the application. Your W2K machine will certainly not have any
registration of the interface used. If you've copied the interface
definition so that both sides hold a copy of the source code that defines the
interface (I do this sometimes and as the interface is immutable, you
actually can do this), then you should make sure that both sides will use the
same IID (as explained above).
2. If all of the registration checks fail then I remember having had some
(many) problems in using IConnectionPointContainer and IConnectionPoint.
Since this code will be supplied for you by the .NET implementation of your
component it is effective hidden code, which is always very hard to debug.
You can check the ATL side for the use of the IConnectionPoint* interface and
check to see if the registration is successfull.
3. Finally you could have troubles delivering the events. Again, like point
2 above, this is hidden code produced by the .NET implementation of your
component. You'd be specifically looking at the delegate that is to deliver
the event.
Have fun!
> Fredrick,
>
[quoted text clipped - 95 lines]
> > Please note the end of the value specifying null for the public key token,
> > that's because the assembly isn't strong named anymore.
Mike McIntyre [MVP] - 03 Jun 2005 06:10 GMT
Frederik,
I am beginning to see what I have been doing wrong on the Win2000 side. I
am off to have some 'fun' learning and trying the new things you have
introduced to me.
Thank you very much,
Mike
> Mike,
>
[quoted text clipped - 165 lines]
>> > token,
>> > that's because the assembly isn't strong named anymore.