摘要
阐述了COM对象与.NET框架对象模型之间的区别,分别讲述了COM作为服务器.、NET作为客户端以及.NET作为服务器、COM作为客户端的COM与.NET之间的互操作实现方法。利用运行时可调用封装器RCW和COM可调用封装器CCW实现了在托管代码(.NET代码)中调用COM组件和在非托管代码中调用.NET组件。在.NET技术成熟的情况下,继续采用COM组件技术编写应用程序将会越来越少,但是在近期内COM技术不会被.NET技术完全取代,而实现COM组件和.NET组件之间的相互操作,可以保护和利用已经存在的大量采用COM组件技术开发的软件和产品,同时可以使那些习惯于COM的编程人员使用.NET平台下的组件软件。
The difference between COM object and object module of. NET framework was elaborated. And the interoperation realization method between COM and . NET while COM as the server and . NET as the client, and con the contrary while . NET as the server and COM as the client was respectively narrated. Calling COM component in unmanaged code (. NET code) and . NET component in managed code was realized by taking advantage of runtime callable wrapper RCW and COM callable wrapper CCW. Thus, in the situation of the . NET technical maturing, programming of using the COM technology will much less than before. But the COM technology would not be completely replaced by . NET in the near future. So a great deal of existent products which are developed using COM component technology are protected and used through realizing the interoperation between the COM and the . NET technology, which also makes the COM programmers use easily the software based on the . NET technology.
出处
《辽宁石油化工大学学报》
CAS
2008年第2期63-66,共4页
Journal of Liaoning Petrochemical University