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. C#
  4. How can I implement a C++ interface in C#

How can I implement a C++ interface in C#

Scheduled Pinned Locked Moved C#
comhelpcsharpc++question
3 Posts 2 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.
  • T Offline
    T Offline
    tiancaidao
    wrote on last edited by
    #1

    hi all, To strip off circular dependency between a C# proj and a C++ proj, I need to define an interface in C++ proj. and implement it with C#. The code is like this: //in C++ proj. using namespace A __gc __interface IA { void display(); } //in C# proj. public class B : A.IA { void display(){} } the error message is like this: COM Interop registration failed. Could not find a type library for assembly "A.IA" ... 3q for help! :) Dilly

    K 1 Reply Last reply
    0
    • T tiancaidao

      hi all, To strip off circular dependency between a C# proj and a C++ proj, I need to define an interface in C++ proj. and implement it with C#. The code is like this: //in C++ proj. using namespace A __gc __interface IA { void display(); } //in C# proj. public class B : A.IA { void display(){} } the error message is like this: COM Interop registration failed. Could not find a type library for assembly "A.IA" ... 3q for help! :) Dilly

      K Offline
      K Offline
      Kiran Kumar Singani
      wrote on last edited by
      #2

      Please Check that mangaed c++ u referenced r nt

      T 1 Reply Last reply
      0
      • K Kiran Kumar Singani

        Please Check that mangaed c++ u referenced r nt

        T Offline
        T Offline
        tiancaidao
        wrote on last edited by
        #3

        Hi, I've searched a lot on internet and in msdn library, but I don't exactly know what really works. I can use call C++ method in my C# project, but I can not implement the C++ interface, I know little about COM/COM+, can you tell me more? 3q!!! Dilly

        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