4

On a 64-bit machine:

Can a 64-bit application call a COM server (out proc) which is running in 32-bit process?

What about vice versa? (32 bit app calling 64-bit COM out proc server)

Thanks!

Saar
  • 1,753
  • 6
  • 20
  • 32

2 Answers2

5

The whole point of out-proc COM is that the two processes interact via RPC (usually LRPC), so it doesn't matter at all which bitness each of them has.

We used COM+ surrogate for forcing 32-bit in-proc components into a separate process for the only purpose of consuming them from 64-bit clients many times - with all necessary stuff for marshalling present it works without any effort.

sharptooth
  • 167,383
  • 100
  • 513
  • 979
1

This may be relevant MIDL: 64-Bit Porting Guide.

Basically what it says is that if you pass pointer types (IUnknown etc) it's OK but if you cheat by passing a pointer disguised as a DWORD you may face some problems.

Motti
  • 110,860
  • 49
  • 189
  • 262
  • 2
    I guess you will face problems anyway if you try to pass DWORD as a pointer into another process - even of same bitness. – sharptooth Jun 30 '10 at 09:53