In my metro application, I have two components one in C++ and another in C#. Can I communicate in between them to and fro? Any code samples or references on how to do this will be very helpful.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you need is some C++/CX code. You can either write C++/CX directly instead of standard C++, or you can create wrappers around your standard C++. Once you do this, your C# code can make calls to the C++ just as if was another C# component.
Specifically, what you’re doing is turing your C++ component into a windows runtime component. Here’s an example of C++ and Javascript, but consuming in C# is similar.