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. .NET COM component to replace existing

.NET COM component to replace existing

Scheduled Pinned Locked Moved COM
csharpcomregexquestion
4 Posts 2 Posters 11 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.
  • C Offline
    C Offline
    cjb110
    wrote on last edited by
    #1

    I've just been handed the task of replacing an existing COM component. It has to stay as a COM component as we have no ability to change the caller. It has to able to call a COM component, that again we can't alter. i.e. where changing the middle part of an existing process and have to do so transparently. I've been doing some background research, and it looks like I can create a .NET COM component easy enough. :thumbsup: I've got a few q's though. When you create the COM interface and class they have GUID's, do these GUID's have to match the existing COM component? Or is it when the caller makes the COM call the OS:confused: determines the component based on name? Another requirement is that the final COM call is 'dynamic' in that the method name we have to call might change, assuming the method will act on the same data is this doable?

    M 1 Reply Last reply
    0
    • C cjb110

      I've just been handed the task of replacing an existing COM component. It has to stay as a COM component as we have no ability to change the caller. It has to able to call a COM component, that again we can't alter. i.e. where changing the middle part of an existing process and have to do so transparently. I've been doing some background research, and it looks like I can create a .NET COM component easy enough. :thumbsup: I've got a few q's though. When you create the COM interface and class they have GUID's, do these GUID's have to match the existing COM component? Or is it when the caller makes the COM call the OS:confused: determines the component based on name? Another requirement is that the final COM call is 'dynamic' in that the method name we have to call might change, assuming the method will act on the same data is this doable?

      M Offline
      M Offline
      manoranjan
      wrote on last edited by
      #2

      To differentiate between various COM components and Interfaces, GUIDs have to be unique. They should not match other COM components. Didn't understand your requirement of "final COM call is 'dynamic'"

      C 1 Reply Last reply
      0
      • M manoranjan

        To differentiate between various COM components and Interfaces, GUIDs have to be unique. They should not match other COM components. Didn't understand your requirement of "final COM call is 'dynamic'"

        C Offline
        C Offline
        cjb110
        wrote on last edited by
        #3

        Thanks, Regarding the last bit, I have to call another third-party COM component. But as the third-party app might be replaced, if possible I'd like to be able to configure the name of the component and method called? (assuming the new and old method are similar in parameters etc)

        M 1 Reply Last reply
        0
        • C cjb110

          Thanks, Regarding the last bit, I have to call another third-party COM component. But as the third-party app might be replaced, if possible I'd like to be able to configure the name of the component and method called? (assuming the new and old method are similar in parameters etc)

          M Offline
          M Offline
          manoranjan
          wrote on last edited by
          #4

          There are two scenarios: 1. Replace the 3rd party COM component and consequently use a different COM Interface (with a different signature). This scenario is independent of COM programming. I would use Adaptor design pattern for this problem. 2. Replace the 3rd party COM component but use same COM Interface (i.e. the Interface's GUID is same). In this case there will be no change in your program. All you need to do is to unregister the old COM server and register the new COM server.

          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