????1.dll?????????
??????????unmanaged code ; managed code;
?????????????System.Runtime.InteropServices
??????????÷?????
????[DllImport("muParser.dll"?? EntryPoint = "mupSetExpr"?? SetLastError = true?? CharSet = CharSet.Ansi?? ExactSpelling = true?? CallingConvention = CallingConvention.StdCall)]
????public static extern void mupSetExpr(void* parser_handle?? StringBuilder a_szExpr);
????????EntryPoint ???????  CharSet ??? ?????????? uncode.
???????????? ???????? ?????? unsafe
????2.????????????
??????????delegate
??????????÷?????
????c++: typedef double (*fun_type1)(double);
????c#:public delegate double  fun_type1(double);
????????c#?????? ??????????????????? c++?е???????
?????????????c++???
????3.????????
??????????fixed
????????????????????????????????c#?к?????? &???????????
?????????????????
????example??
????public double* AddVariable()
????{
????fixed ( double * ptrVar = &afValBuf )
????{
????return ptrVar;
????}
????}
?????????????????????????? fixed ????
????4.????c++?????????? char* ?????
??????????StringBuider
????????????????c++?в???char*?????? ?????????????????
????c#?е?String ?? ??????????? ?????????
???????????StringBuilder???
?????????????????????????????е?????
????5.????dll?????
???????c++??dll ????????????????COM?????????????????.NET??reference ??????
???????????????
???????????.net website
??????????  ????ClassLibrary ???????dll????bin?? ???????? ??????????dll ??????
????6.????c#????????:
??????????unsafe
??????÷??????????????????? ?? unsafe