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.
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).
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.
I understand that Windows Azure uses 64-bit so I am wondering what would be the best approach here to migrate my app?
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.
Or would be it better to recompile my 64-bit apps and somehow use the 32-bit DLLs?
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.
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:
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.
This lab "Advanced Web and Worker Roles" in the Windows Azure Training Kit covers using a Legacy COM dll in Azure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With