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. General Programming
  3. COM
  4. Upgrading a COM interface

Upgrading a COM interface

Scheduled Pinned Locked Moved COM
c++comquestion
3 Posts 3 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.
  • J Offline
    J Offline
    Jeremy Pullicino
    wrote on last edited by
    #1

    Hi, I need to add a new method to my COM object. Should I create a new COM object which aggregates the first and contains the new method? Or is it OK to add a new method to an existing COM object? Jeremy. Jeremy Pullicino C++ Developer Homepage

    A S 2 Replies Last reply
    0
    • J Jeremy Pullicino

      Hi, I need to add a new method to my COM object. Should I create a new COM object which aggregates the first and contains the new method? Or is it OK to add a new method to an existing COM object? Jeremy. Jeremy Pullicino C++ Developer Homepage

      A Offline
      A Offline
      Abhishek Srivastava
      wrote on last edited by
      #2

      Hi ,:) Well it depends that how is ur COM object being used ,if ur object has been aggregated by some other client using its typelibs, or some other COM object has derived ur interface to write its own functionality in the existing method , then in that case if u will add Methos in the same interface , other clients of your COM object will stop working coz of changed interface , changed typelibs thats is where comes Versioning . But if these are not the cases and u r just working on one client .then adding one more method will not create any problem. well i know that much only :-O Regards :) Abhishek Srivastava Software Engg (VC++) India ,Noida Mobile no 9891492921 :)

      1 Reply Last reply
      0
      • J Jeremy Pullicino

        Hi, I need to add a new method to my COM object. Should I create a new COM object which aggregates the first and contains the new method? Or is it OK to add a new method to an existing COM object? Jeremy. Jeremy Pullicino C++ Developer Homepage

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

        Strictly, you want to add a method to an interface. You don't need to create a new object, but you almost certainly want to contain a new interface. If you're using ATL, this is almost trivial (amend the IDL, specify the new interface as deriving from the old one, and add the method; amend the declaration and definition of your class by having it derive from the new interface not the old one, amend any IDispatchImpl declaration to support the new interface rather than the old, add the interface into the interface map). If you haven't published the interface (ie the client and server are not yet released) you can just amend the interface. Steve S

        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