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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ashish P K

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

    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


  • Jeroen Mostert

    #2
    Re: Calling 32 bit COM+ from DotNet App on a 64 bit OS

    Ashish P K wrote:
    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.

    --
    J.

    Comment

    Working...