IConnectionPointImpl クラス

このクラスは、コネクション ポイントを実装します。

構文

template<class T, const IID* piid, class CDV = CComDynamicUnkArray>
class ATL_NO_VTABLE IConnectionPointImpl : public _ICPLocator<piid>

パラメーター

T
IConnectionPointImpl から派生したクラス。

piid
コネクション ポイントが表すインターフェイスの IID へのポインター。

CDV
接続を管理するクラス。 既定値は CComDynamicUnkArray であり、無制限の接続が許可されます。 CComUnkArray を使用することもできます。これにより固定数の接続が指定されます。

メンバー

パブリック メソッド

名前 説明
IConnectionPointImpl::Advise コネクション ポイントとシンクの間の接続を確立します。
IConnectionPointImpl::EnumConnections コネクション ポイントの接続を反復処理する列挙子を作成します。
IConnectionPointImpl::GetConnectionInterface コネクション ポイントが表すインターフェイスの IID を取得します。
IConnectionPointImpl::GetConnectionPointContainer 接続可能なオブジェクトへのインターフェイス ポインターを取得します。
IConnectionPointImpl::Unadvise 以前に Advise を介して確立した接続を終了します。

パブリック データ メンバー

名前 説明
IConnectionPointImpl::m_vec コネクション ポイントの接続を管理します。

解説

IConnectionPointImpl は、コネクション ポイントを実装します。これにより、オブジェクトは発信インターフェイスをクライアントに公開できます。 クライアントにより、シンクと呼ばれるオブジェクトにこのインターフェイスが実装されます。

ATL は IConnectionPointContainerImpl を使用して接続可能なオブジェクトを実装します。 接続可能なオブジェクトの中の各コネクション ポイントは、発信インターフェイスを表し、piid で識別されます。 クラス CDV により、コネクション ポイントとシンクの間の接続が管理されます。 各接続は、"cookie" によって一意に識別されます。

ATL でのコネクション ポイントの使用の詳細については、コネクション ポイントに関するページを参照してください。

継承階層

_ICPLocator

IConnectionPointImpl

必要条件

ヘッダー: atlcom.h

IConnectionPointImpl::Advise

コネクション ポイントとシンクの間の接続を確立します。

STDMETHOD(Advise)(
    IUnknown* pUnkSink,
    DWORD* pdwCookie);

解説

接続の呼び出しを終了するには、Unadvise を呼び出します。

Windows SDK の IConnectionPoint::Advise に関するページを参照してください。

IConnectionPointImpl::EnumConnections

コネクション ポイントの接続を反復処理する列挙子を作成します。

STDMETHOD(EnumConnections)(IEnumConnections** ppEnum);

解説

Windows SDK の IConnectionPoint::EnumConnections に関するページを参照してください。

IConnectionPointImpl::GetConnectionInterface

コネクション ポイントが表すインターフェイスの IID を取得します。

STDMETHOD(GetConnectionInterface)(IID* piid2);

解説

Windows SDK の IConnectionPoint::GetConnectionInterface に関するページを参照してください。

IConnectionPointImpl::GetConnectionPointContainer

接続可能なオブジェクトへのインターフェイス ポインターを取得します。

STDMETHOD(GetConnectionPointContainer)(IConnectionPointContainer** ppCPC);

解説

Windows SDK の IConnectionPoint::GetConnectionPointContainer に関するページを参照してください。

IConnectionPointImpl::m_vec

コネクション ポイント オブジェクトとシンクの間の接続を管理します。

CDV m_vec;

解説

既定では、m_vec のタイプは CComDynamicUnkArray です。

IConnectionPointImpl::Unadvise

以前に Advise を介して確立した接続を終了します。

STDMETHOD(Unadvise)(DWORD dwCookie);

解説

Windows SDK の IConnectionPoint::Unadvise に関するページを参照してください。

関連項目

IConnectionPoint
クラスの概要