Hi I have to rewrite an Application (C#) that connects to Adroit 10 and retrieve TagValues that gets Pushed into a Video Management System.
The previous app was written in VB and I used the following to connect to Adroit:
SCADAServer = CreateObject("AdroitServer")
Try
p = SCADAServer.connect(mComputerName, mServerName)
mIsConnected = True
Catch ex As Exception
'MessageBox.Show(ex.Message, "SCADA Connect Error")
End Try
I see i cant use the createobject in VS ( C#) So I have added a reference in my Application to AdroitCOMLib
In my source i added:
using AdroitCOMLib;
in a Class function I added the Following:
bool errorState = false;
object ErrorMessage = new object();
Adroit AdrObj = new Adroit();
AdrObj .Connect(mComputerName, mServerName, errorState, ErrorMessage);
But I get the Following Error:
System.Runtime.InteropServices.COMException: ‘Retrieving the COM class factory for component with CLSID {C118226E-2BA1-4D43-9CFC-13C16488BA44} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).’
Am I going the wrong route here ?