tags:

views:

32

answers:

2

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!

+3  A: 

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
+1  A: 

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
I guess you will face problems anyway if you try to pass DWORD as a pointer into another process - even of same bitness.
sharptooth