利用现有的COM组件

COM is both a specification and an implementation.
COM即是一个规范也是一个实现.

COM作为组件对象模型,它的特性主要有语言无关性,面向对象的特性,进程的透明性可重用性.

An interface pointer is a pointer to an object instance that points, in turn, to the implementation of each method in the interface.
一个接口指针是指向一个对象(VTable)
在COM规范中支持接口的对象是通过一个指向函数指针数组的指针被访问。

Interfaces are not objects themselves; they provide a way to access an object. Therefore, clients do not access data directly; clients access data through an interface pointer.

The client's interface pointer, then, is a pointer to the pointer to the vtable


指向实际对象的指针对于客户和COM本身都是不可见的,无论何时,对象的客户只能看见接口指针而不是对象指针。
在COM中,客户只有一个指向函数指针的指针,而对象是不可见的,完全是不透明的。

在COM继承中,派生类仅仅继承其类类的接口而不继承它的实现

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值