COM Client/Server cross 64/32 bit processes

空扰寡人 提交于 2019-12-23 14:24:13

问题


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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/3148039/com-client-server-cross-64-32-bit-processes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!