开发者

Does proxy/stub expose the interface?

开发者 https://www.devze.com 2023-01-27 19:11 出处:网络
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 c

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?


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).

0

精彩评论

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

关注公众号