Calling 32 bit COM+ from DotNet App on a 64 bit OS

A

Ashish P K

I have a .Net Application(64 bit) calling a 32 bit COM+. What is the best
way to achieve this?

Basically I have got a webpart dll, which is compiled for any CPU and IIS
running on 64 bit. All the webparts works fine but the webpart which are
accessing legacy COM+ methods fails to get loaded.

To test this further I created a small DotNet Sample App which loads
COM+method. If the Sample app is comiled for 32 everything works on 64 bit
OS.
But I can't go with this because my webparts.dll gets loaded from IIS which
is running in 64 bit. (Running IIS is 32 mode is not an option)

Tried using corflags.exe to change the interop dll to 32 mode that also
din't help.

Any suggestions would be appreciated.


Thanks,
Ashish
 
J

Jeroen Mostert

Ashish said:
I have a .Net Application(64 bit) calling a 32 bit COM+. What is the best
way to achieve this?

Basically I have got a webpart dll, which is compiled for any CPU and IIS
running on 64 bit. All the webparts works fine but the webpart which are
accessing legacy COM+ methods fails to get loaded.

To test this further I created a small DotNet Sample App which loads
COM+method. If the Sample app is comiled for 32 everything works on 64 bit
OS.
But I can't go with this because my webparts.dll gets loaded from IIS which
is running in 64 bit. (Running IIS is 32 mode is not an option)

Tried using corflags.exe to change the interop dll to 32 mode that also
din't help.
Your can host the component in a 32-bit executable (using corflags to force
it so) and use some means of interprocess communication (other than COM,
obviously) to shuttle requests back and forth. Look at .NET remoting or WCF
for this.

You will not be able to devise a solution that doesn't use a separate
hosting executable -- the dividing line between 32-bit and 64-bit is fairly
absolute.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top