COM Interop Sample: COM Client and .NET Server RRS feed

  • General discussion

  • Hi!

    I tried to build a C# dll and use it via COM and an C++ Console Application. I followed the steps from the "COM Interop Sample: COM Client and .NET Server" sample. I only used my methods and properties. I also generated an own key file and used in the application.

    The problem is i can Import the tlb file, but the namespace of the dll is not detected. I also tried this example from CodeProject
    which caued the same problem. Also the tlh file is generated out of the tlb.

    I can wirte the using namespace statement, it compiles but the Visual Studi still underlines the line red. I also can not compile the line ICalculationPtr pICalculation(__uuidof(Calculation));

    I hope someone can help me and tell me what can cause this errorness behavoir?


    • Changed type Nancy Shao Wednesday, June 3, 2009 8:58 AM OP does not follow up
    Thursday, May 28, 2009 6:19 AM

All replies

  • Not sure what your problem is, at least copy and paste the error message you see.  They are supposed to be informative.  If you suspect namespace name problems, a quick fix is the no_namespace attribute on the #import directive.
    Hans Passant.
    Thursday, May 28, 2009 11:00 AM
  • Hi Martin,

    We are changing the issue type to “General Discussion” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by opening the Options list at the top of the post editor window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!

    Best Regards,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, June 3, 2009 8:57 AM