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. Managed C++/CLI
  4. Managed wrapper and inheritance

Managed wrapper and inheritance

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++oophelptutorial
1 Posts 1 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
    Johan de Koning
    wrote on last edited by
    #1

    Hello, I was wondering if the following thing can be managed by using c++. I have two unmanaged classes. Lets call them A and B. Class B inheritance from A. A has a method for example ShowMeSomeText() and method B has another method ShowMeSomeMore() If i want to create a managed wrapper, i will create two new managed classes A and B (ManagedA and ManagedB). ManagedB will have an inheritance of ManagedA. Inside both classes are declarations of the unmanaged object A and B (so ManagedA has a private declaration of unmanaged object A and the same for ManagedB but with object B) Now i want create in for example a C# program a new instance of object ManagedB and want to call the method ShowMeSomeText() (which is from the class A). This will not work correctly because ManagedB will call the method from ManagedA but this will use the unmanaged object A and this will go wrong. How can this be solved? Hope somebody can help me? Thanx

    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