32-bit legacy COM DLLs on Windows Azure 32-bit legacy COM DLLs on Windows Azure azure azure

32-bit legacy COM DLLs on Windows Azure


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:

  1. What type of COM interfaces (automation compatible or not)?
  2. What kind of marshaling they support (inproc only or out-of-proc)
  3. If marshaling works across processes, do you have control on how to register objects (inproc or out-of-proc).
  4. How easy is it to create managed wrapper for your object (like a custom C++/CLI interop assembly that is hosted by 32-bit process and able to communicate to 64-bit host using either WCF or COM automation)

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.