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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. How the component knows it has been Advise for connection from Client?

How the component knows it has been Advise for connection from Client?

Scheduled Pinned Locked Moved ATL / WTL / STL
question
3 Posts 3 Posters 1 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.
  • A Offline
    A Offline
    Amar Sutar
    wrote on last edited by
    #1

    Hi All, I am writing a one component in which, I have to register the callback method in the component when client Advise for connection. How should i do this? Thanks in Advance. Amar.:)

    S 1 Reply Last reply
    0
    • A Amar Sutar

      Hi All, I am writing a one component in which, I have to register the callback method in the component when client Advise for connection. How should i do this? Thanks in Advance. Amar.:)

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      Check out the documentation for IConnectionPointImpl and IConnectionPointContainerImpl. Your component needs to implement IConnectionPoint, and the Advise method will typically store the provided sink in some container (like an array, or a map, or a list...) When something happens in the component that triggers an event (such as changing a property, or a timer firing, or...) the component iterates through all the entries in that container, and calls the appropriate method(s) passing any parameters as required.

      Steve S Developer for hire

      S 1 Reply Last reply
      0
      • S Steve S

        Check out the documentation for IConnectionPointImpl and IConnectionPointContainerImpl. Your component needs to implement IConnectionPoint, and the Advise method will typically store the provided sink in some container (like an array, or a map, or a list...) When something happens in the component that triggers an event (such as changing a property, or a timer firing, or...) the component iterates through all the entries in that container, and calls the appropriate method(s) passing any parameters as required.

        Steve S Developer for hire

        S Offline
        S Offline
        sudeesh
        wrote on last edited by
        #3

        there is an m_vec member which contains a list of clients which the sinked the event.

        Sudeesh

        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