Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. COM
  3. AfxConnectionAdvise

AfxConnectionAdvise

Scheduled Pinned Locked Moved COM
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Francisco Jose Sen del Prado 0
    wrote on last edited by
    #1

    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.

    A 1 Reply Last reply
    0
    • F Francisco Jose Sen del Prado 0

      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.

      A Offline
      A Offline
      Alex Gorev
      wrote on last edited by
      #2

      Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.

      J B 2 Replies Last reply
      0
      • A Alex Gorev

        Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.

        J Offline
        J Offline
        jose 1
        wrote on last edited by
        #3

        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.

        B 1 Reply Last reply
        0
        • A Alex Gorev

          Hi, You can't fire events through the DCOM! This feature is avalable in COM+ only... Regards, Alex Gorev, Dundas Software.

          B Offline
          B Offline
          Brian Hart
          wrote on last edited by
          #4

          "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

          1 Reply Last reply
          0
          • J jose 1

            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.

            B Offline
            B Offline
            Brian Hart
            wrote on last edited by
            #5

            "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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups