ienumopcitemattributes.cpp
来自「此为Insight opc client InfoServerExplorer源」· C++ 代码 · 共 137 行
CPP
137 行
/////////////////////////////////////////////////////////////////////////////
//
// OPC Data Access VC++ Client: IEnumOPCItemAttributes.CPP
// (Source File)
//
/////////////////////////////////////////////////////////////////////////////
//
// Author: Raphael Imhof
// Initial Date: 11/04/98
// $Workfile: IEnumOPCItemAttributes.cpp $
// $Revision: 1 $
// $Date: 7/27/99 5:22p $
// Target System: Microsoft Windows NT 4.0
// Environment: Visual C++ 5.0 / OPC DataAccess 1.0/2.0
// Remarks:
//
/////////////////////////////////////////////////////////////////////////////
//
// Description: implementation of the CIEnumOPCItemAttributes class.
// IEnumOPCItemAttributes wrapper.
//
//
/////////////////////////////////////////////////////////////////////////////
//
// History of Changes (Please remove very old comments and blank lines!)
// $Log: /IDK/OPCServer/clients/VC++/InfoServerExplorer/IEnumOPCItemAttributes.cpp $
//
// 1 7/27/99 5:22p Imhof
//
// 1 7/27/99 5:18p Imhof
//
// 3 1/15/99 6:43p Imhof
// Updated legal notice.
//
// 2 11/10/98 2:20p Imhof
// Added file header's.
//
// $Nokeywords:$ (To avoid useless search while checking in.)
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1998, Siemens Building Technologies, Inc. Landis Division
//
// SIEMENS BUILDING TECHNOLOGIES, INC. IS PROVIDING THE FOLLOWING
// EXAMPLES OF CODE AS SAMPLE ONLY.
//
// SIEMENS BUILDING TECHNOLOGIES, INC. MAKES NO REPRESENTATIONS
// OR WARRANTIES OF ANY KIND WITH RESPECT TO THE VALIDTY OF THE
// CODES OR DESIRED RESULTS AND DISCLAIMS ALL SUCH
// REPRESENTATIONS AND WARRANTIES, INCLUDING FOR EXAMPLE,
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE. SIEMENS BUILIDNG TECHNOLOGIES, INC. DOES NOT
// REPRESENT OR WARRANT THAT THE FOLLOWING CODE SAMPLES ARE
// ACCURATE, VALID, COMPLETE OR CURRENT.
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "infoserverexplorer.h"
#include "IEnumOPCItemAttributes.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIEnumOPCItemAttributes::CIEnumOPCItemAttributes(CComPtr<IEnumOPCItemAttributes> pIEnum)
{
m_pIEnum = pIEnum;
}
CIEnumOPCItemAttributes::~CIEnumOPCItemAttributes()
{
}
HRESULT CIEnumOPCItemAttributes::Next( ULONG celt,
OPCITEMATTRIBUTES** ppItemArray,
ULONG* pceltFetched)
{
if(m_pIEnum == NULL)
return E_FAIL;
HRESULT res = m_pIEnum->Next(celt, ppItemArray, pceltFetched );
if(FAILED(res))
{
TRACE(_T("CIEnumOPCItemAttributes::Next\n"));
}
return res;
}
HRESULT CIEnumOPCItemAttributes::Skip(ULONG celt)
{
if(m_pIEnum == NULL)
return E_FAIL;
HRESULT res = m_pIEnum->Skip(celt);
if(FAILED(res))
{
TRACE(_T("CIEnumOPCItemAttributes::Skip\n"));
}
return res;
}
HRESULT CIEnumOPCItemAttributes::Reset()
{
if(m_pIEnum == NULL)
return E_FAIL;
HRESULT res = m_pIEnum->Reset();
if(FAILED(res))
{
TRACE(_T("CIEnumOPCItemAttributes::Reset\n"));
}
return res;
}
HRESULT CIEnumOPCItemAttributes::Clone(IEnumOPCItemAttributes** ppEnumItemAttributes)
{
if(m_pIEnum == NULL)
return E_FAIL;
HRESULT res = m_pIEnum->Clone(ppEnumItemAttributes);
if(FAILED(res))
{
TRACE(_T("CIEnumOPCItemAttributes::Clone\n"));
}
return res;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?