Downloaded example will not run

Help
2012-07-05
2013-05-30
  • Andy Lawton

    Andy Lawton - 2012-07-05

    I downloaded the code from the website today, and tried to open it in Visual Studio 2010 Pro. The upgrade wizard ran, and converted everything OK. I then built the drivers (Build/Build Advanced HMI drivers) and then built the solution. When I ran it, I got an error where the application tries to connect to the Matrikon OPC server - which I have installed and I can connect to OK with the Matrikon OPC Explorer. The error is:
    Unable to cast COM object of type 'System.__ComObject' to interface type 'OpcRcw.Comn.IOPCServerList2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9DD0B56C-AD9E-43EE-8305-487F3188BF7A}' failed due to the following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    This occurs in OPCComm.vb, in CreateDLLInstance, at the line DLL.Connect.
    It sounds like there is some COM component that it's trying to use that isn't registered. Any ideas?

     
  • Archie

    Archie - 2013-01-10

    A solution was just recently discovered to this problem. A 32 bit OPC dll is being attemped to run on a 64 bit machine. You will need to change  the target CPU to x86.

    - Right Click on AdvancedHMI in Solution Explorer and select Properties
    - Select the Compile tab
    - In VS 2012, you will see a drop down box for Target CPU, change to x86
    - In VS 2010, you will need to click the Advanced Compile Options button at the bottom to get to Target CPU

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks