AfxConnectionAdvise
-
Hello: I'm developing a Server ATL component wich supports conneccion points. The client side is an MFC dialog based application. I sometimes need for the server advise to client. I've used the 'AfxConnectionAdvise' MFC global function to do it. If I start the server (an executable server type) before the client the AfxConnectionAdvise function returns 'true' and there is no problem, but if the server is started by DCOM system (when I start the client) then the AfxConnectionAdvise function returns 'false'. ¿What can I do to solve this problem? Thanks in advance, Jose.
-
Hello: I'm developing a Server ATL component wich supports conneccion points. The client side is an MFC dialog based application. I sometimes need for the server advise to client. I've used the 'AfxConnectionAdvise' MFC global function to do it. If I start the server (an executable server type) before the client the AfxConnectionAdvise function returns 'true' and there is no problem, but if the server is started by DCOM system (when I start the client) then the AfxConnectionAdvise function returns 'false'. ¿What can I do to solve this problem? Thanks in advance, Jose.
Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.
-
Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.
-
Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.
"You can't fire events through the DCOM" Wrong wrong wrong. I have written working code on this, and I have almost completed posting a full tutorial on The Code Project (at http://www.codeproject.com/useritems/HelloTutorial1.asp) on this very thing! Beware; the tutorial is un-edited yet and is still incomplete, but hang with me and you shall see the light :) It's amazing what one thinks is impossible until one tries... :) Brian Hart
-
Yes. I can fire events through the DCOM when the server is launched before the client. But if the server is launched remotely by the client, I cannot establish the connection between them.
"If the server is launched remotely by the client, I cannot establish the connection between them." Jose, Look soon for a tutorial I wrote, implementing a DCOM server and client with the full support for everything, including making the server a Service, which in your case would solve your problems. However, you don't have a service, you have an EXE. Here's what to do: 1. Click the Start button, and then click Run. 2. Type 'dcomcnfg' in the box. 3. Search in the list for the name you gave your server project (say 'EventSvr'). Double-click it. 4. Go to Identity. Click 'This user,' and type in the Administrator username and the Administrator password, if you know it. If you don't then ask your sysadmin. Voila! Hope it works :) Cheers, Brian