没有代理/存根DLL的进程外COM服务器? [英] Out-of-process COM server without a proxy/stub DLL?

查看:193
本文介绍了没有代理/存根DLL的进程外COM服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习如何实现进程外COM服务器,并遇到了此代码项目文章构建本地COM服务器和客户端:分步示例


<我可以构建它,并且运行良好,但是代理/存根DLL在哪里?我所看到的只是IDL文件,在构建过程中会从该文件中生成代理/存根代码。但是DLL是如何构建的,它在哪里?

解决方案

简短的答案是所有接口都标记为 oleautomation ,所以oleaut32.dll执行封送处理,因为COM知道如何封送接口中使用的所有类型。



如果缺少 oleautomation或已指定类型该COM默认情况下不知道如何进行封送处理(请参阅此处的列表),则需要使用非默认的封送拆封器及其存根。


I am learning how to implement an out-of-process COM server and came across this Code Project article, Building a LOCAL COM Server and Client: A Step by Step Example.

I can build it, and it runs fine, but where is the proxy/stub DLL? All I can see is the IDL file from which the proxy/stub code is generated during the build. But how is the DLL built, and where is it?

解决方案

The short answer is that all the interfaces are marked "oleautomation", so oleaut32.dll performs the marshaling, since COM knows how to marshal all the types used in the interfaces.

If "oleautomation" were missing, or a type was specified that COM doesn't know how to marshal by default (see the list here), your nondefault marshaler and its stub would be required.

这篇关于没有代理/存根DLL的进程外COM服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆