但C是利用"structure"或"record"类型,将上包含双重的指向函数指针表的成员,实现接口描述,从而编写COM和使用COM的。如一个字典的接口:
struct IDictionaryVtbl;
struct IDictionary
{
IDictionaryVtbl *pVtbl;
};
struct IDictionaryVbtl
{
BOOL(* Initialize)(IDictionary *this);
BOOL(* LoadLibrary)(IDictionary *this,String);
BOOL(* InsertWord)(IDictionary *this,String,String); &n
C与C++接口实现比较
最新推荐文章于 2024-10-11 15:13:37 发布
