摘要
在软件项目的开发过程中,总是会存在一些涉及托管代码与非托管代码之间互操作的需求。由于这两类代码执行机制不同,造成了这两类代码间的交互存在一定的障碍。而C++/CLI代码却是一种特殊的编程技术,它介于托管代码与非托管代码之间。所以以C++/CLI代码作为中介,可以简单且高效的实现托管代码与非托管代码之间的交互。对如何使用C++/CLI代码实现托管代码与非托管代码之间的交互进行了研究,并以C#代码为例展示了其交互方式,最后通过一个试验,对此交互方式的执行效率进行了验证。
There always exist the requirement of the interaction between managed code and unmanaged code in some software de-velopment project.But there is a gap between managed code and unmanaged code,because the difference of the run principle.C++/CLI is a special program technology.It can deal with both managed code and unmanaged code.So with the help of C++/CLI,we can realize the interaction between managed code and unmanaged code.This paper will discuss about how to realize the interac-tion between managed code and unmanaged code by using C++/CLI,and use a C# Sample to show the interaction method.
出处
《微型电脑应用》
2013年第1期38-40,44,共4页
Microcomputer Applications