locked
c# Interoperability RRS feed

  • Question

  • User2036759390 posted

    Hi Friends,

    I want to communicate between c# and c++. Can somebody tell me what is the best approach for this?

    I want something like I have a c# dll which exposes some methods. I want to consume those methods in the COM client.(c++) which means source is c# dll and client is c++.

    Give a good sample on this requirement friends.

    Thanks,

    Shanenarrifield. 

    Monday, May 31, 2010 12:57 AM

Answers

  • User2036759390 posted

    Hi,

    Thanks. we are now able to communicate with c# and COM with c# assembly with no dependent assemblies.

    But, i have some issues with the dependency assemblies. I have c# assembly  that have the dependency assemblies, when i am trying to register the assembly for the .tlb file, i am facing the problem like "RegAsm : error RA0000 : Could not load file or assembly.The System cannot find the file specified.

    Any idea on this?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 2, 2010 5:33 AM

All replies

  • User197322208 posted

    read tutorial here

    http://msdn.microsoft.com/en-us/library/zsfww439.aspx

    and be attentive at CoCreateInstance

    Monday, May 31, 2010 3:33 AM
  • User2036759390 posted

    Hi,

    I have gone throught the tutorial what has mentioned. I did a sample for interoperability using http://msdn.microsoft.com/en-us/library/aa645738(vs.71).aspx .

    I am facing issues with CoCreateInstance. The program is compiling fine. The problem with cocreateinstance() giving an error like hr "the System cannot find the file specified" I registered the .tlb file to registry editor also but i am not able to fix the problem. Can you give a fix for my problem.? 

    Tuesday, June 1, 2010 4:20 AM
  • User197322208 posted

    look into the registry for the guid. Did you find there ?

    If yes, then check if the path is ok

    If not, register a new time with regasm


    Tuesday, June 1, 2010 4:40 AM
  • User2036759390 posted

    Hi,

    Thanks. we are now able to communicate with c# and COM with c# assembly with no dependent assemblies.

    But, i have some issues with the dependency assemblies. I have c# assembly  that have the dependency assemblies, when i am trying to register the assembly for the .tlb file, i am facing the problem like "RegAsm : error RA0000 : Could not load file or assembly.The System cannot find the file specified.

    Any idea on this?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 2, 2010 5:33 AM