Windows Azure上的32位传统的COM DLL文件 [英] 32-bit legacy COM DLLs on Windows Azure

查看:78
本文介绍了Windows Azure上的32位传统的COM DLL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用约15-20传统的32位C ++ COM DLL文件在我的web应用程序,其中一些32位的DLL有第三方的依赖其还DLL的COM或本机。

I use around 15-20 legacy 32-bit C++ COM DLLs in my web app, some of these 32-bit DLLs have 3rd party dependencies which are further DLL's COM or native.

我正在考虑迁移到Windows Azure中我的理解是一个64位平台。任何人都可以告诉我的32位的DLL文件是否起作用? (我知道,它现在可以REGSVR32它们)。

I am considering moving to Windows Azure which I understand is a 64-bit platform. Can anyone advise whether my 32-bit DLLs will work? (I know that it is now possible to regsvr32 them).

通过一两个星期的工作,我可以重新编译我的DLL来64位然而,这是不可能的第三方依赖关系我没有源。

With a week or two’s work I could recompile my DLLs to 64-bit however this is not possible for the 3rd party dependencies as I don’t have the source.

据我所知,Windows Azure中使用64位,所以我想知道什么是最好的方法这里迁移我的应用程序?

I understand that Windows Azure uses 64-bit so I am wondering what would be the best approach here to migrate my app?

即。我应在移动32位的DLL文件,并依靠在WOW64上 - 这会甚至工作?我不介意小的性能损失。

i.e. should I move the 32-bit DLLs over and rely on WoW64 – will this even work? I don’t mind a small performance hit.

或者会更好重新编译我的64位应用程序和不知何故的使用32位的DLL?

Or would be it better to recompile my 64-bit apps and somehow use the 32-bit DLLs?

推荐答案

答案是肯定的。 Windows Azure的就像是一个正常的Windows Server 2008 x64和它有32位的子系统。这里的唯一限制是该网络的作用和辅助角色宿主进程是64位。

The answer is yes. Windows Azure is just like a normal Windows Server 2008 x64, and it has 32-bit subsystem. The only limitation here is that the web role and worker role hosting process is 64 bit.

考虑到这一点,你将不得不做一些64位主机进程和32位的DLL之间互操作的。当然,进程内COM对象将不会在这种情况下工作。这是很难在这里给出更具体的提醒不知道的细节:

With this in mind, you will have to do some sort of interop between 64-bit host process and 32-bit DLLs. Of course, inproc COM objects will not work in this case. It is hard to give more specific advise here without knowing details:


  1. 什么类型的COM接口(兼容自动化或没有)?

  2. 他们支持什么样的编组(只或超出进程内INPROC)

  3. 如果编组跨进程的作品,你有没有对如何注册对象(INPROC或超出进程内)控制。

  4. 有多容易创建托管包装为你的对象(如自定义由32位进程,并能够使用任何WCF或COM自动化到64位主机通信托管C ++ / CLI互操作程序集)

我不知道它是否会工作,但另一种选择要考虑的是尽量coerse您的应用程序池为32位进程中运行。您需要在IIS模式以完全信任就跑这是你的角色启动任务:结果
    APPCMD程序池设置/apppool.name:/ enable32BitAppOnWin64:真正的结果
您必须确定应用程序池的名字您的应用程序将被使用。再次,我不知道这将在所有的工作,但我想这值得一试,因为如果它的工作原理,这将是你最简单的选择。

I don't know if it would work, but another option to consider is try to coerse your application pool to run as 32 bit process. You will need to run in IIS mode with full trust and run this as your role startup task:
appcmd apppool set /apppool.name: /enable32BitAppOnWin64:true
You will have to determine name of application pool your app will be used. And again, I'm not sure that would work at all, but I guess it worth a try, because if it works it would be the easiest option for you.

这篇关于Windows Azure上的32位传统的COM DLL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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