There is very good artcile on COM / Connection Points in MFC.
ReplyOriginally posted by: Pavi
You have given savvy examples for connection points. After reading your articles, i could go ahead and write my own code for them. Thanks many times !
ReplyOriginally posted by: George
I tried these methods to catch events from the objects of Microsoft Access but I didn't succed. Have somebody tried this. Please help!
ReplyOriginally posted by: shahid
how to implement C.point using CCmTarget and CConnectionPoint only in MFC.
Originally posted by: hannah parker
Back in 2000, the following question was asked...
"The Part II example is using IDispatch for the sink interfaces. Have you also tried it using IUnknown for the sink interfaces, or is it that ATL only supports IDispatch for ConnectionPoints???
Are there any performance differences in using ConnectionPoint compared to the custom callback interface?"
I am looking for an answer to the same question... Any advice?
Thanks
Hannah
ReplyOriginally posted by: AndyC
What would be the best way for the server to handle client connections when the client is closed (or crashed) with out unadvising the server.
Cheers
Andy
Originally posted by: Nihit Saxena
Hi Dhar How are you,.
Nihit
ReplyOriginally posted by: Scott Guillaudeu
Thankyou _SO_ much for your article and sample project. I've been frustrated by examples in a book (Beginning ATL COM) not working with VC6, and the Dr. GUI article series cut short one article (the most important one--the client!!). Using your sample code, I got my program working. Thankyou, thankyou, thankyou!!!
Originally posted by: Saleem U
How do you implement a MFC Executable (remote) Server without using ATL that sends events to a MFC Executable Client?
Originally posted by: Jean-Pascal Chauvet
Hi,
This article is very useful and completes quite well MSDN samples on the subject. On topic that is not covered anywhere (and I spent days looking) is when the event has a COM object as a parameter. Say for instance in your sample that the addition is not on 2 integers but on 2 matrixes. The OnAdditionDone event would therefore pass a IMatrix * obj (VT_DISPATCH) pointer instead of an integer (VT_I2).
How would you implement the event handler on the client side, and how would you actually start using the IMatrix pointer to access its members (tried everything I could think of, wither it doesn't compile or compiles but crashes). In other words, how to complete this:
void CCoCaller::OnAdditionDone(IMatrix *result)
{
// How to implement this so that it works:
BSTR str; result->get_Name(str);
}
MSDN gives 2 samples on how to implement IDispEventSimpleImpl and IDispEventImpl using Word and Excel veents, none of them show events that pass COM objects as parameters.
Any help would be very useful. Thanks a lot
JP
Reply