开发者

How to generate a 64 bit COM Proxy

开发者 https://www.devze.com 2023-02-07 12:51 出处:网络
I have a 32 bit COM server (and the source code for it) The source generates the server and a 32 bit proxy stub. (The MIDL compiler generates the proxy stub co开发者_运维问答de.)

I have a 32 bit COM server (and the source code for it) The source generates the server and a 32 bit proxy stub. (The MIDL compiler generates the proxy stub co开发者_运维问答de.)

I would like to make a 64 bit proxy as well, so that 64 bit programs can talk to my 32 bit COM server.

How do I go about converting a 32 bit proxy into a 64 bit proxy that talks to a 32 bit process? I'm guessing that just recompiling with /D:_M_AMD64 is not enough.


The proxy code generated by the MIDL compiler should work. You just need to build a 64-bit dll from that code.

Make sure your types are defined properly. Make sure you avoid types like UINT_PTR which will not work when a 64-bit caller calls a 32-bit server.

0

精彩评论

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

关注公众号