Because the Execution Code of C # And CLI can be obtained through disassembly (I just heard that there is no practical practice ).
For those that do not want to be disclosedCodeCan be written in C ++ and called by C # Or CLI.
Several methods have been found on the Internet
1: C #-> C ++
2: C #-> cli-> C ++
For details, see:Http://www.cppblog.com/mzty/archive/2008/03/12/44280.html
I personally think that method 1 is too cumbersome. In the C # project, I need to declare the output function again. More importantly, during debugging, I often warn stack mismatch to cause conflicts (annoying)
Although CLI engineering is added in method 2, the idea is clear and I recommend it to you.
Note, however, that the CLI and C ++ strings must be converted.
Convert string to char * as follows *
Using namespace system: runtime: interopservices;
String ^ strtitleinput = "dfdfsdfsdfassd ";
Char strtitle [256];
Intptr P = MARSHAL: stringtohglobalansi (strtitleinput );
Char * pinput = static_cast <char *> (P. topointer ());
Strcpy (strtitle, pinput );
MARSHAL: freehglobal (P );
J