掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
COMのイベントをVC++で受け取る方法 (ID:65143)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
2.は > IConnectionPointContainer *pConnPtContainer= NULL; > hr = m_wordApplication.m_lpDispatch->QueryInterface( > IID_IConnectionPointContainer, > (void **)&pConnPtContainer ); より IConnectionPointContainer *pConnPtContainer= NULL; hr = g_pIEchoLinkSession->QueryInterface( IID_IConnectionPointContainer, (void **)&pConnPtContainer ); ではないでしょうか? 同様に3.は > hr = pConnPtContainer->FindConnectionPoint( > IID_IApplicationEvents2, > &m_pConnectionPoint > ); hr = pConnPtContainer->FindConnectionPoint( DIID__IEchoLinkSessionEvents, &g_pConnectionPoint ); 4.は > m_pAppEventListener = new CAppEventListener(); > m_pAppEventListener->AddRef(); > > // Set up advisory connection. > hr = m_pConnectionPoint->Advise(m_pAppEventListener, > &m_dwConnectionCookie); g_pIEchoLinkEvents = new CIEchoLinkEventListener(); // 1.で作成したクラス g_pIEchoLinkEvents->AddRef(); // Set up advisory connection. hr = g_pConnectionPoint->Advise(g_pIEchoLinkEvents, &g_dwConnectionCookie); では?
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.