64位C#与32位VB6 COM对象 [英] 64 bit C# with a 32 bit VB6 COM object

查看:139
本文介绍了64位C#与32位VB6 COM对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个32位的进程内STA VB6 DLL。可悲的是我不能做这个事情。我的C#组件被64位获益匪浅。反正是有来电/接口从我的64位进程这个32位的dll?任何形式的包装或任何东西吗?

I have a 32 bit in-proc STA VB6 dll. I sadly cannot do anything about this. My C# component greatly benefits from being 64 bit. Is there anyway to call/interface with this 32-bit dll from my 64 bit process? Any sort of wrapper or anything?

推荐答案

有是你可以做到这一点没有直接的方法。

There's no direct way you can do this.

既然你不能端口VB6 INPROC DLL我建议你写一个32位的出实现相同的接口程序服务器,并有其委派下来到VB6 code。然后,您的64位应用程序可以调用进程外的服务器,因为COM将采取编组过程之间的类型的照顾。

Since you can't port the VB6 inproc dll I'd suggest you write a 32bit out of process server that implements the same interfaces and have it delegate down to the VB6 code. Then, your 64bit app can call the out of process server as COM will take care of marshaling the types between the processes.

这不是pretty,咬它的工作!

It ain't pretty, bit it will work!

这篇关于64位C#与32位VB6 COM对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆