????c#????C++??????Щ???????
???????????? ???????[ 2014/7/15 11:02:34 ] ????????c# C++ net
????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
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11