Re: Connection points and aggregation
Barnab? <firstname.lastname@example.org> wrote:
Don't you mean to use __uuidof(IAggObject) here?
COM_INTERFACE_ENTRY_AGGREGATE expects an IID of an interface, not a
CLSID of a coclass.
[default] interface IMainObject ;
[source] interface IAggObject;
The [source] attribute here is suspicious. Is IAggObject the interface
you (or your inner) implement, or the outgoing interface you fire events
on and expect clients to implement? If it's the former, it should not
have [source] attribute. If it's the latter, it shouldn't appear in your
[source] interface IConnectionPointContainer;
This line does not make sense, remove it entirely.
Now when I launch my application, the AtlAdvise return S_OK, but I
still can't catch my event.
Are you sure any events are fired in the first place? Since AtlAdvise
succeeds, IConnectionPointContainer is correctly exposed. The failure
must be elsewhere - either the event is never fired, or your sink is set
With best wishes,
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925