摘要
64位进程不能加载32位dll是程序或平台移植中需要解决的一个难题。比较了32位和64位体系结构的区别,分析了64位进程不能加载32位dll的原因。研究了进程外COM服务器组件的内部机制,给出了64位进程访问32位进程外COM组件的调用模型。设计并实现了32位的进程外COM服务器。在COM组件类中封装对32位dll的访问接口,64位进程通过调用在32位进程外COM服务器中注册的COM组件类中的接口,间接地访问32位dll的相关接口功能。方法设计时采用单态模式和垃圾回收机制,线程安全,性能稳定。
The 64-bit process cannot load 32-bit dll is a difficult problem to solve in program or platform transplantation. It gives a com- parison of 32-bit and 64-bit system structure,and analyzes the reason that the 64-bit process cannot load 32-bit dll. Study the internal mechanism of out-of-process COM,give a call model about 64-~bit process to access 32-bit process COM. Design and implement 32-bit COM server, and the COM component class encapsulates 32-bit dll API. 64-bit process calls 32-bit COM component class interface registered in the process COM server, and indirectly accesses 32-bit dll API. Using singleton mode and garbage collection mechanism,the COM server works stably, and is safe in thread.
出处
《计算机技术与发展》
2013年第3期93-95,100,共4页
Computer Technology and Development
基金
陕西省科学技术研究发展计划项目(2012K06-14)
陕西省教育自然科学专项基金资助项目(08JK310)
关键词
进程外
COM
64位进程
单态
线程安全
out-of-process
COM
64 -bit process
singleton
thread security