BOOL bSuccess = m_stccOrders.CreateDispatch(_T ("STCC.STCCOrders"));
if (bSuccess) {
m_filledOrders.AttachDispatch(m_stccOrders.GetFilledOrders());
ASSERT(m_filledOrders.m_lpDispatch != NULL);
m_filledEvents.AttachDispatch(m_filledOrders.m_lpDispatch, FALSE);
ASSERT(m_filledEvents.m_lpDispatch != NULL);
LPUNKNOWN pUnkSink = m_Sink.GetIDispatch(FALSE);
AfxConnectionAdvise(m_filledEvents.m_lpDispatch, DIID_IFilledEvents, pUnkSink, FALSE, &m_dwCookie);
AfxMessageBox("Attatching to FilledEvents OK!");
}
여기서 AttachDispatch를 QueryInterface()해도 되지 않나염? 암튼 인터페이
스가 붙질 안네염.. 계속 실패해요...