• 大小: 37KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: C/C++
  • 标签: atl  com  连接点  Sink  

资源简介

这是一个演示ATL连接点的一个例子,包括c++客户端和js客户端

资源截图

代码片段和文件信息

// Calc.cpp : Implementation of CCalc

#include “stdafx.h“
#include “Calc.h“


// CCalc

STDMETHODIMP CCalc::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] = 
{
&IID_ICalc
};

for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (InlineIsEqualGUID(*arr[i]riid))
return S_OK;
}
return S_FALSE;
}

STDMETHODIMP CCalc::Add(LONG a LONG b)
{
// TODO: Add your implementation code here
LONG nVal = a + b;

Fire_AddResult(nVal);

return S_OK;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-03 23:02  ConnectionPoint\
     文件         515  2012-06-02 22:52  ConnectionPoint\Calc.cpp
     文件        2038  2012-06-02 23:46  ConnectionPoint\Calc.h
     文件         635  2012-06-02 22:45  ConnectionPoint\Calc.rgs
     文件        4496  2012-06-02 22:45  ConnectionPoint\ConnectionPoint.aps
     文件        1550  2012-06-02 22:43  ConnectionPoint\ConnectionPoint.cpp
     文件         241  2012-06-02 22:43  ConnectionPoint\ConnectionPoint.def
     文件        1094  2012-06-02 22:50  ConnectionPoint\ConnectionPoint.idl
     文件        3525  2012-06-02 22:45  ConnectionPoint\ConnectionPoint.rc
     文件         135  2012-06-02 22:43  ConnectionPoint\ConnectionPoint.rgs
     文件        1845  2012-06-03 22:03  ConnectionPoint\ConnectionPoint.sln
     文件       32824  2012-06-03 23:02  ConnectionPoint\ConnectionPoint.suo
     文件        7545  2012-06-02 23:21  ConnectionPoint\ConnectionPoint.vcproj
     文件        1389  2012-06-03 23:02  ConnectionPoint\ConnectionPoint.vcproj.TUXINGKAI.tuxingkai.user
     文件         164  2012-06-02 22:43  ConnectionPoint\ConnectionPointps.def
     文件        4058  2012-06-02 22:43  ConnectionPoint\ConnectionPointPS.vcproj
     文件        1389  2012-06-03 23:02  ConnectionPoint\ConnectionPointPS.vcproj.TUXINGKAI.tuxingkai.user
     文件        2017  2012-06-03 21:56  ConnectionPoint\ConnectionPoint_i.c
     文件        9183  2012-06-03 21:56  ConnectionPoint\ConnectionPoint_i.h
     文件        8583  2012-06-03 21:56  ConnectionPoint\ConnectionPoint_p.c
     文件         851  2012-06-03 21:56  ConnectionPoint\dlldata.c
     文件         364  2012-06-02 22:43  ConnectionPoint\dllmain.cpp
     文件         336  2012-06-02 22:43  ConnectionPoint\dllmain.h
     文件        3111  2012-06-02 22:43  ConnectionPoint\ReadMe.txt
     文件         547  2012-06-02 22:45  ConnectionPoint\resource.h
     文件         211  2012-06-02 22:43  ConnectionPoint\stdafx.cpp
     文件         521  2012-06-02 22:43  ConnectionPoint\stdafx.h
     文件        1432  2012-06-02 22:43  ConnectionPoint\targetver.h
     文件         526  2012-06-02 23:53  ConnectionPoint\Test.htm
     文件         886  2012-06-02 22:50  ConnectionPoint\_ICalcEvents_CP.h
     目录           0  2012-06-03 23:01  TestConnPoint\
............此处省略10个文件信息

评论

共有 条评论