Re: connection points?
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 02/24/04
- Next message: Igor Tandetnik: "Re: APP Handler problem"
- Previous message: Rhett Gong [MSFT]: "Re: IStorage ERROR STG_E_OLDDLL"
- In reply to: Phil Da Lick!: "Re: connection points?"
- Next in thread: Phil Da Lick!: "Re: connection points?"
- Reply: Phil Da Lick!: "Re: connection points?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 09:35:26 -0500
"Phil Da Lick!" <phil_the_lick@nospam.hotmail.com> wrote in message
news:1WF_b.9812$h44.1099836@stones.force9.net...
> Thanks both, I think what I'll do is just pass a pointer to the
required
> interface into the children. They are defined entirely within the
scope of
> the parent. When the parent dies, the children die as well so this
shouldn't
> be a problem.
What if the client still holds an interface pointer of the element? You
can't have an element destroyed, or the client will crash the moment it
calls anything through that pointer.
> I just wondered whether the "correct" approach was to use a connection
> point, that's all.
Connection points are designed for loosely coupled components -
components that have little or no a-priori knowledge of each other. You
don't really need such a heavy-weight mechanism for tightly coupled
components - components that are designed from the start to integrate
with each other, often on the source code level. You don't even need COM
for that - they can just hold straight C++ pointers to each other.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
- Next message: Igor Tandetnik: "Re: APP Handler problem"
- Previous message: Rhett Gong [MSFT]: "Re: IStorage ERROR STG_E_OLDDLL"
- In reply to: Phil Da Lick!: "Re: connection points?"
- Next in thread: Phil Da Lick!: "Re: connection points?"
- Reply: Phil Da Lick!: "Re: connection points?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|