Applies To:
  • CitectSCADA 5.xx, 6.00
  • CitectHMI 5.xx, 6.00

When I try to connect to the server I get an error code returned of 0x80040202 

This error is returned to the client application from the Windows Operating System. A search of the Microsoft knowledge base indicates that error code 0x80040202 is a CONNECT_E_CANNOTCONNECT error. The CONNECT_E_CANNOTCONNECT error is returned when the server calls the IConnectionPoint::Advise (Server) method and fails. The knowledge base indicates that this can happen when the Common file OPCProxy.dll is out of Sync with other files that are dependent upon it or that it is dependent upon.

This can happen if you update the server and the update fails. You can also see this error if you install another OPC application and it changes one but not all of the files used.

The best solution is to reinstall the CitectSCADA install and it should re-sync those files. Ultimately you could delete the OPCproxy.dll and OPCcomn_ps.dll files and re-run the install so that our files are placed there. If you choose to delete and replace the files it is possible that this could effect other applications.

If you believe you configured DCOM correctly, and you still keep getting this error after connecting to the server successfully, it is possible that the wrong opcproxy.dll is being loaded. If you have multiple copies of opcproxy.dll on your API node (possibly because you have more than one OPC server on your machine), make sure that they are the same version. It is safest to have only one version around on your system (in \winnt\system32 directory, that being the latest version). If they are from before June, 1999, they may contain an error which causes errors like above. If the directories containing such versions are specified in the system path, that is why you get the above error although you configured everything correctly.

For more information on this error please refer to Microsoft Knowledge Base Article - 183216.

Enter to solution problem here 

OPC, 0x80040202, DCOM