Does proxy/stub expose the interface?

血红的双手。 提交于 2020-01-26 03:26:46

问题


Suppose I introduced a COM interface and don't want any third party to use it. I have full control over the sources of the COM component and the IDL file that holds the interface definition. My COM component will need marshalling stuff fro that interface, so I'll need to either implement IMarshal or provide a typelib or provide a proxy/stub.

Obviously if I provide a typelib anyone can inspect it and find what my interface is and how it can be used. That's not what I want.

What if I use proxy/stub? Will it expose the interface and let anyone inspect it or will it keep the interface details covert?


回答1:


Unfortunately this is not possible. The idea of COM is that clients can discover the components and the interfaces.

In a previous job I worked on a digital rights equipped application and there we deliberately did NOT use COM just to make it more difficult for people to tap into our application. We had to build our own component infrastructure (in addition to other security measures).



来源:https://stackoverflow.com/questions/4311997/does-proxy-stub-expose-the-interface

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