摘要
C#与C++混合编程是最常见的混合编程方式。用C#调用C++编写的动态链接库存在很多需要解决的问题。对C#调用C++编写的动态链接库的必要性及托管与非托管的概念进行了描述,并对C#调用C++时面临的导入DLL、数据类型转换、结构体参数的处理、指向结构体的指针及在C#中用结构体模拟共用体等常见问题进行研究并给出必要的示例代码。
Combined C# with C + + is the most normally used mixed programming method. There are many problems to be solved while use C# to invoke the dynamic link library(DLL) developed by C + +. The necessi- ty of invoking C + + developed dynamic link library by C# is described and the concept of managed and un- managed code is explained. The problems such as import DLL, data type convert, struct parameter, pointer and parameter etc. are researched and necessary example code is listed.
出处
《测控技术》
CSCD
北大核心
2013年第5期105-108,共4页
Measurement & Control Technology
基金
西安邮电学院博士科研启动经费资助项目(110-1207)