I have an application of live broadcaster in C/C++ with lots of API and Graphics. now i have to make design in C# . please help me how to integrate both. Thanks in advance
Asked
Active
Viewed 82 times
0
-
C# can call C functions, and C++ code can be made to look like C for external use. – Basile Starynkevitch Jan 09 '14 at 06:05
-
possible duplicate of [Possible to call C++ code from C#?](http://stackoverflow.com/questions/935664/possible-to-call-c-code-from-c) – crthompson Jan 09 '14 at 06:08
-
http://blogs.msdn.com/b/borisj/archive/2006/09/28/769708.aspx – Nagaraj S Jan 09 '14 at 06:10
2 Answers
0
- You can create a dll project in C++ and import the C++ dll into C# project. For more details, you can refer to: http://msdn.microsoft.com/en-us/magazine/cc164123.aspx
- If you want to use C++ in c# code directly, you can create a CLR(C++/CLI) project, then you can write c++ and c# code in the same project. For more details, please refer to:
http://msdn.microsoft.com/en-us/magazine/cc163852.aspx and http://www.codeproject.com/KB/mcpp/cppcliintro01.aspx

Ravi
- 853
- 8
- 17
0
There are two options:
- Create a C interfaces and the call methods using PInvoke
- Create a C++/CLI wrapper
See this answer for more information