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. Inheritance in COM

Inheritance in COM

Scheduled Pinned Locked Moved COM
comoophelploungecareer
3 Posts 3 Posters 9 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.
  • K Offline
    K Offline
    Karismatic
    wrote on last edited by
    #1

    Hi all, I got into the problem where I have to inherit a COM class/object with another COM class/object. Actually I am creating a component for for reading/writting CAD entities so I have many entities with common properties so, for all the general properties I have to write the property functions in each COM class which is just duplication of code so, I just wanted to create a template base class that will have the set of properties & using which I can make the code reusable. Structure of my component is as follows Document has Entites has Entity information Please suggest me what to do in this situation.

    Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job

    M C 2 Replies Last reply
    0
    • K Karismatic

      Hi all, I got into the problem where I have to inherit a COM class/object with another COM class/object. Actually I am creating a component for for reading/writting CAD entities so I have many entities with common properties so, for all the general properties I have to write the property functions in each COM class which is just duplication of code so, I just wanted to create a template base class that will have the set of properties & using which I can make the code reusable. Structure of my component is as follows Document has Entites has Entity information Please suggest me what to do in this situation.

      Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job

      M Offline
      M Offline
      Md Marufuzzaman
      wrote on last edited by
      #2

      Hi, Please let me know that you using COM class / simple class file & export the tlb file using RegAsm command...

      Don't forget to click "Good Answer" on the post(s) that helped you. Thanks Md. Marufuzzaman

      1 Reply Last reply
      0
      • K Karismatic

        Hi all, I got into the problem where I have to inherit a COM class/object with another COM class/object. Actually I am creating a component for for reading/writting CAD entities so I have many entities with common properties so, for all the general properties I have to write the property functions in each COM class which is just duplication of code so, I just wanted to create a template base class that will have the set of properties & using which I can make the code reusable. Structure of my component is as follows Document has Entites has Entity information Please suggest me what to do in this situation.

        Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job

        C Offline
        C Offline
        CurtD 2
        wrote on last edited by
        #3

        Have you looked into aggregation?

        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