Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Originally published on Geo SCADA Knowledge Base by sbeadle1 | June 10, 2021 03:13 AM
📖 Home Back
ClearSCADA 2009 R1 contains a new DDK, based on .NET. The old SDK is still supported, allowing drivers developed under this SDK to run in the newer versions, however some changes have been made in the SDK that require minor modifications to the SDK code.
When compiling the SDK version code, the compiler will produce an error similar to "'ATL::CComObject' : cannot instantiate abstract class"
A change has been made in the SDK that adds a new method to the Channel class. The effect of this ommission is that while a driver developed under the SDK will appear to run under ClearSCADA 2007, the driver may crash after some period of use. This could vary, but has been seen in the order of around 3 days. The driver will then need to be restarted.
Specifically, this has been caused by the addition of the method 'raw_CheckReply' to the channel class. To correct this error, add the following code to the driver:
Channel.h:
STDMETHED(raw_CheckReply)(/*[in]*/ ISDKChannel *pChannel, /*[in]*/ ISDKScanner *pScanner, /*[in,out]*/ VARIANT *Data, /*[in,out]*/ DWORD *Length, /*[out,retval]*/ SDKReplyType *Reply)
Channel.cpp:
HRESULT CChannel::raw_CheckReply(/*[in]*/ ISDKChannel *pChannel, /*[in]*/ ISDKScanner *pScanner, /*[in,out]*/ VARIANT *Data, /*[in,out]*/ DWORD *Length, /*[out,retval]*/ SDKReplyType *Reply) { return E_NOTIMPL; }
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.