I want to use a 32-bit in-proc COM server from a 64-bit process on Windows 2008 R2. Hosting in a surrogate process is rather slow because I make lots of small calls and have huge marshalling overhead.
One thought would be to write a .NET assembly that uses that server, compile it as x86 and then invoke via PowerShell. Clearly I need 32-bit PowerShell for that.
So far I looked at one installation of Windows 2008 R2 and looks like it has both 64-bit and 32-bit versions of PowerShell and so I can achieve what I want.
I'm not sure whether any installation of Windows 2008 R2, especially ones that are used as Windows Azure hosts, have both versions of PowerShell installed.
Are both 32-bit and 64-bit versions of PowerShell always installed by default on 64-bit Windows 2008 R2?