简体   繁体   中英

How to pass COM pointer from one process to another?

I have an interface pointer to an COM object sitting within process 1. I would like to get access to the same object from another process. How can I achieve this purpose? I believe directly passing over the pointer wouldn't work due to different address spaces. I know it involves the marshaling/proxy/stub stuff. But I don't know details.

Can somebody provide some detailed instructions regarding the steps to follow and the functions to call? Thanks a lot. I am not the designer for the COM object itself. I am just using it.

You are going to have to understand the basics of COM to make this work. Basically process 1 is an out-of-proc server for your client (the second process). Take a dig around in the COM docs here , especially Getting a Pointer to an Object .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM