连接点
来源:互联网 发布:sql修改语句update 编辑:程序博客网 时间:2024/04/29 22:58
一个COM组件允许有许多个连接点对象(IConnectionPoint),管理这些接点对象的接口叫做连接点容器(IconnectionPointContainer), 连接点容器接口比较简单,只有两个函数,一个是FindConnectionPoint(),表示你想查找的连接点,另一个是EnumConnectionPoint(),表示列出所有的连接点,然后你去选择使用哪个连接点,每一个连接点可以被多个客户端的接收器(Sink)连接。
Instance below:
1, New a project named Connection based ATL, select "New ATL Object" in pop menu that right click the project in ClassView. Input the name and chose the "support connection points" in tab "Attributes", now, the project model has been finished.
2, Add method for the interface , then add envent for dealing with the operation, only compile the idl file or compile the project(no need for more spend), the interface enter implement connection points and check the choice in dialog "Implement Connection Points", the frame will generate some code for connect to the event.
3,New a test project for check the correct of the COM, first import the head file and .tlb, new a class based general derived from IDispatch, then you should implement the virtual function defined in IUnknown(QueryInterface, AddRef, Release) and IDispatch(GetTypeInfo, GetTypeInfoCount, GetIDsOfName, Invoke),the important function is Invoke, it will recieve the message customer advise, according the parameter dispID you can invoke different method.
- 连接点
- 连接点
- 连接点
- 连接点访问
- 深入解析连接点
- Com连接点
- vs2008 ATL 连接点
- 连接格点
- 将点连接起来
- 什么是AOP连接点?
- VISIO添加连接点
- Fzoj1616连接格点
- 连接格点题解
- 自定义类实现连接点
- COM 连接点事件讲解
- JDBC连接sql2000--点通
- 点按钮或者连接下载
- COM 连接点事件 转
- 某高级程序员的忠告
- 优秀程序员必备七要件
- 把MSSQLServer数据库导入到MySql数据库中
- 【python】getattr(),dive into python中提到这个函数很有用,我没有领悟到其中意思,先记下来
- 2007必须学习的10项.NET技术
- 连接点
- 如何编写并运行你写的简单“操作系统”
- 用VB操纵DHTML(Document)对象
- 转载:一只在IT上苦苦挣扎,努力奋斗的小小菜鸟
- 经典算法(2)——0/1背包问题(动态规划法)
- Terrain Tutorial/Computing Normals
- 动机的寓言
- Windows下RSH的使用说明
- 整理C# 二进制,十进制,十六进制 互转