I have developed a software in C++.
Now I am trying to add GUI for it .
using windows forms.
I understand that it is not recommended to write it in C++
So I have started to write it in C#.
This is a managed code.
Then I have to call the functions in my software to perform the processing and computing .
I understand that I have to wrap the C++ native code with a CLI managed code.
How do I do it ? and How do I transfer the parameters ? I need clear full instructions with a code sample.
1. How do I define the prototypes of the wrapping functions ? (strings declarations like System::String )
2. How do I convert System::String from the wrapper class functions to the native C++ functions ?
3. What is Invoke ? PInvoke ?
4. Is there any C# method for System::String to convert it to characters array string and via versa
Thanks.
Now I am trying to add GUI for it .
using windows forms.
I understand that it is not recommended to write it in C++
So I have started to write it in C#.
This is a managed code.
Then I have to call the functions in my software to perform the processing and computing .
I understand that I have to wrap the C++ native code with a CLI managed code.
How do I do it ? and How do I transfer the parameters ? I need clear full instructions with a code sample.
1. How do I define the prototypes of the wrapping functions ? (strings declarations like System::String )
2. How do I convert System::String from the wrapper class functions to the native C++ functions ?
3. What is Invoke ? PInvoke ?
4. Is there any C# method for System::String to convert it to characters array string and via versa
Thanks.
Comment