资源简介
KEPWare的OPC通讯示例C++版,可以直接编译运行
代码片段和文件信息
// **************************************************************************
// advisesink.cpp
//
// Description:
// Implements the CKAdviseSink class and IAdviseSink COM interface. Groups
// in OPC Servers can use the IAdviseSink interface to advise us of data
// change events.
//
// OPC 1.0 requires that only the OnDataChange member function of the
// IAdviseSink interface be implemented. None of the others (OnClose
// OnSave etc.) should ever get called.
//
// The IAdviseSink interface is used by OPC version 1.0. OPC version 2.0
// uses the IOPCDataCallback interface instead. If you know that your
// server(s) will only be using OPC version 2.0 you don‘t really need this.
//
// DISCLAIMER:
// This programming example is provided “AS IS“. As such Kepware Inc.
// makes no claims to the worthiness of the code and does not warranty
// the code to be error free. It is provided freely and can be used in
// your own projects. If you do find this code useful place a little
// marketing plug for Kepware in your code. While we would love to help
// every one who is trying to write a great OPC client application the
// uniqueness of every project and the limited number of hours in a day
// simply prevents us from doing so. If you really find yourself in a
// bind please contact Kepware‘s technical support. We will not be able
// to assist you with server related problems unless you are using KepServer
// or KepServerEx.
// **************************************************************************
#include “stdafx.h“
#include “opctestclient.h“
#include “advisesink.h“
#include “item.h“
#include “group.h“
// **************************************************************************
// CKAdviseSink ()
//
// Description:
// Constructor. Reference count is initialized to zero.
//
// Parameters:
// none
//
// Returns:
// none
// **************************************************************************
CKAdviseSink::CKAdviseSink () : m_cRef (0)
{
}
// **************************************************************************
// QueryInterface ()
//
// Description:
// This function is called to obtain a pointer to one of the COM interfaces
// objects of this class support (in this case only IAdviseSink and its base
// class IUnknown). As is standard COM practice our reference count is
// incremented upon a successful query.
//
// This is one of the 3 member functions all COM interfaces must implement.
//
// Parameters:
// REFIID riid Requested interface type: IID_IUnknown
// or IID_IAdviseSink.
// LPVOID *ppInterface Pointer to requested interface.
//
// Returns:
// STDMETHODIMP -
// S_OK - Query successful ppInterface set to requested pointer.
// E_INVALIDARG - One of the arguments was invalid.
// E_NOINTERFACE - Requested interface is not supported.
// **************************************************************************
STDM
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 23420 2007-02-13 11:04 Visual C++ OPC Client Example\advisesink.cpp
文件 1852 2007-02-13 11:04 Visual C++ OPC Client Example\advisesink.h
文件 17809 2007-02-13 11:04 Visual C++ OPC Client Example\datasink20.cpp
文件 3455 2007-02-13 11:04 Visual C++ OPC Client Example\datasink20.h
文件 36339 2007-02-13 11:04 Visual C++ OPC Client Example\document.cpp
文件 4604 2007-02-13 11:04 Visual C++ OPC Client Example\document.h
文件 14218 2007-02-13 11:04 Visual C++ OPC Client Example\editfilters.cpp
文件 3956 2007-02-13 11:04 Visual C++ OPC Client Example\editfilters.h
文件 25098 2007-02-13 11:04 Visual C++ OPC Client Example\eventview.cpp
文件 4091 2007-02-13 11:04 Visual C++ OPC Client Example\eventview.h
文件 2731 2007-02-13 11:04 Visual C++ OPC Client Example\fixedsharedfile.h
文件 8305 2007-02-13 11:04 Visual C++ OPC Client Example\globals.cpp
文件 4681 2007-02-13 11:04 Visual C++ OPC Client Example\globals.h
文件 119956 2007-02-13 11:04 Visual C++ OPC Client Example\group.cpp
文件 7772 2007-02-13 11:04 Visual C++ OPC Client Example\group.h
文件 24208 2007-02-13 11:04 Visual C++ OPC Client Example\grouppropertysheet.cpp
文件 4655 2007-02-13 11:04 Visual C++ OPC Client Example\grouppropertysheet.h
文件 53462 2007-02-13 11:04 Visual C++ OPC Client Example\groupview.cpp
文件 3465 2007-02-13 11:04 Visual C++ OPC Client Example\groupview.h
文件 4429 2007-02-13 11:04 Visual C++ OPC Client Example\imagebutton.cpp
文件 1699 2007-02-13 11:04 Visual C++ OPC Client Example\imagebutton.h
文件 25014 2007-02-13 11:04 Visual C++ OPC Client Example\item.cpp
文件 4302 2007-02-13 11:04 Visual C++ OPC Client Example\item.h
文件 65972 2007-02-13 11:04 Visual C++ OPC Client Example\itemadddlg.cpp
文件 4810 2007-02-13 11:04 Visual C++ OPC Client Example\itemadddlg.h
文件 32624 2007-02-13 11:04 Visual C++ OPC Client Example\itempropertiesdlg.cpp
文件 2901 2007-02-13 11:04 Visual C++ OPC Client Example\itempropertiesdlg.h
文件 81825 2007-02-13 11:04 Visual C++ OPC Client Example\itemview.cpp
文件 4663 2007-02-13 11:04 Visual C++ OPC Client Example\itemview.h
文件 16104 2007-02-13 11:04 Visual C++ OPC Client Example\itemwritedlg.cpp
............此处省略181个文件信息
- 上一篇:基于单片机的温湿度采集系统/VC++上位机
- 下一篇:C++网络五子棋(源码)
相关资源
- C++网络五子棋(源码)
- 基于单片机的温湿度采集系统/VC++上位
- c++酒店餐饮管理系统
- C++ zip文件解压
- 基于有线局域网语音聊天系统VC++实现
- Microsoft Visual C++ 2013 Redistributable Pack
- 基于C++/Access的宿舍管理系统
- Microsoft Visual C++ 2013 Runtime 64bit 工具
- 侯捷课程之《C++中的内存管理》讲义
- 泡泡龙源码 C++
- MFC邮件收发完整
- 简单的OpenCV实现摄像头实时显示和视
- 滤波程序滤波程序滤波程序c++语言编
- 基于SNMP的IP流量统计(VC++实现)源代
- C++面向对象程序设计实验
- IP数据包的捕获与解析
- 中国象棋引擎ZWM 版本0.2.(VC++源码)
- 完整socket c++
- 水库优化调度c++builder程序
- 《C/C++中国象棋程序入门与提高》源代
- C++编程思想.zip
- 视频播放器VS,C++, 130行
- C++版 模拟LED动态显示文字
- 数据结构与程序设计C++语言描述 Rob
- Bmp2jpeg图片格式转换
- 人体跟踪源代码,用visual c++
- C++ 实现 HTTP HTTPS POST GET(包含curl版本
- C++ 基于 MFC 和 mysql 的学生管理系统
- More Effective C++中文版高清完整.pdf
- Mastering C++ Game Development.pdf
评论
共有 条评论