COM组件
Jason5563
这个作者很懒,什么都没留下…
展开
-
COM 学习(一)
[size=x-large]简单模拟,非真实COM组件[/size] [code="c++"] #include #include using namespace std; // //接口定义 // interface IX { virtual void __stdcall Fx1() = 0 ; virtual void __stdcall Fx2() = 0...2010-05-04 13:32:10 · 75 阅读 · 0 评论 -
COM 学习(二)
[code="C++"]// // IUnknown.cpp // #include #include using namespace std; void trace(const char* msg) { cout Fy() ; // Use interface IY. } trace("Client: Ask for an ...2010-05-04 21:42:03 · 85 阅读 · 0 评论 -
COM 学习(三)
[size=x-large]实现 AddRef 和 Release 函数,控制COM组件的生命周期[/size][code="C++"] #include #include using namespace std; void trace(const char* msg) { cout2010-05-05 15:09:24 · 78 阅读 · 0 评论 -
COM 学习(四)
[size=x-large]还只是模拟,把组件 抽取出来,通过DLL的方式调用 1.定义接口[/size] [code="C++"]// // Iface.h // // Interfaces interface IX : IUnknown { virtual void __stdcall Fx() = 0 ; } ; interface IY : IUnknow...原创 2010-05-07 12:38:07 · 106 阅读 · 0 评论 -
COM 学习(五-A) 组件创建过程(图示)
1. 创建过程 2. 控制流程原创 2010-05-07 17:13:02 · 144 阅读 · 0 评论 -
COM 学习(五-B) 真实的COM
[size=x-large]真实的COM,程序同 inside com,Chapter07 1. 客户端:[/size] [code="C++"]// // Client.cpp - client implementation /* CoCreateInstance: 在COM库中包含一个用于创建组件的名为CoCreatelnstancae的函数。此函数需要一 个CLSID...原创 2010-05-07 17:43:51 · 190 阅读 · 0 评论 -
COM 包容组件
效果: <!--StartFragment -->文件说明: 1、客户端 : CLIENT.cpp: main方法 Contain.exe :编译后的执行程序 GUIDS.CPP: GUID相关定义 IFACE.H:接口定义 2、组件: CMPNT1.cpp: 外部组件 CMPNT1.def: 接口定义 Cmpnt1.dll:编译后的DLL CMPNT2.cpp 内部组件 CMPNT...原创 2010-05-09 15:46:36 · 144 阅读 · 0 评论