Notify connected COM clients
-
Hi, I have a simple ATL server project created with VS2008 (e.g. IDummy) with an connection point event (e.g. Fire_test) and a stand-alone thread. My thread should notify all connected clients with the specified event. How can I accomplish this? Maybe using EnumConnectionPoints, but how? Any examlples? Thx in advance :-D
-
Hi, I have a simple ATL server project created with VS2008 (e.g. IDummy) with an connection point event (e.g. Fire_test) and a stand-alone thread. My thread should notify all connected clients with the specified event. How can I accomplish this? Maybe using EnumConnectionPoints, but how? Any examlples? Thx in advance :-D
a) make sure the ATL server uses an appropriate threading model (e.g. free threading) b) Make sure the thread has a pointer to the C++ class instance underlying your COM object. c) call the COM object's Fire_test method. The important thing is to make sure teh thread has visibility of the C++ object instance, not just the COM interface pointers - otherwise, it won't see the Fire_test method.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
a) make sure the ATL server uses an appropriate threading model (e.g. free threading) b) Make sure the thread has a pointer to the C++ class instance underlying your COM object. c) call the COM object's Fire_test method. The important thing is to make sure teh thread has visibility of the C++ object instance, not just the COM interface pointers - otherwise, it won't see the Fire_test method.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p