开发者

COM Client/Server cross 64/32 bit processes

开发者 https://www.devze.com 2023-01-05 09:19 出处:网络
On a 64-bit machine: Can a 64-bit application call a COM server (out proc) which is running in 32-bit process?

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!


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消