locked
c++ header in c#

    Question

  • Before I have a question, I have poor English, sorry.



    I want use c++ header in c# project.

    However, c++ header isn't made by class.

    If I modify the header, it doesn't work.

    So, I don't use C++/CLI wrapping project. (All C++/CTL example introduced to make wrapping that make by class.)

    How I can use c++ header in c#?

    please help.



    notice : c++ header in C++ Runtime Component.
    Wednesday, July 30, 2014 9:30 AM

Answers

  • Hi ellay06,
          You should compile the C++ object to a dll or WinRT Component and use that in a C# app.  There is no other way that I am aware of to use C++ header in C#.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 30, 2014 12:09 PM
    Moderator

All replies

  • Hi ellay06,
          You should compile the C++ object to a dll or WinRT Component and use that in a C# app.  There is no other way that I am aware of to use C++ header in C#.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 30, 2014 12:09 PM
    Moderator
  • Thank for answer!! :-) 

    It's very helpful. 

    Thursday, July 31, 2014 12:17 AM