Use the search feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Alternatively, if you are unable to find a solution, we have an additional resource - our PTC eSupport Portal . If you are prompted to log into the eSupport Portal, you can use your My Kepware credentials. Need a My Kepware account? Create one here .

Search Solution Results By:
View All Solutions

Kepware Knowledge Base: Solution

OPC Error Codes Generated by Operating System

Last Update: 11/7/2018

The error codes listed below are returned to an OPC client (and occasionally to an OPC server) from the operating system on behalf of the server or client. These error codes are usually related to DCOM or Remote Process Call (RPC).

Returned Error Code 0x80010108
Possible Cause:
In Windows 2000 Server or 2003 Server SP1, the remote client disconnected from the server with the error code "RPC_E_Disconnected".

According to Microsoft, this error occurs when the RPCSS Service does not ping the remote client at the required two-minute interval. For more information, refer to both the OPC Foundation's forum and to

Returned Error Code 0x80040005
This DCOM error code means that the user must run the object to perform the operation, but is unable to connect to the server.

Possible Cause:
1. The server has timed out.
2. The DCOM settings are incorrect.

1. Ensure that the server has not timed out in Demo Mode.
2. Verify the DCOM settings. For more information, refer to DCOM - Secure by Default.

Returned Error Code 0x80040004
This DCOM error code means that there is no connection for the specified Connection ID.

Possible Cause:
1. The server has not been properly installed or uninstalled. A registry entry has been left, but no server has been installed.
2. Although a remote connection is being attempted, the client is not being directed to that remote instance of the server.

1. Ensure that the server has not timed out in Demo Mode.
2. Verify the DCOM settings. For more information, refer to DCOM - Secure by Default.

Returned Error Code 0x80040007
This server error code generally occurs when the requested item no longer exists. The error description is "Uninitialized Object".

Possible Causes:
1. The item may have been removed from the server.
2. If the driver license has not been entered (or an unlicensed driver is being run with a licensed one), the demo period may have expired. When this occurs, the server will not allow the client to access server items.
3. If a license number has been entered, but a password has not been requested (or has not been entered), then the 10-day grace period may have expired. When this occurs, the server will not allow the client to access server items. An event will also be reported in the server's Event Log.

1. Verify that the item being requested exists in the server.
2. Stop and restart the server in order to restart the demo period. If running licensed and unlicensed products together, either remove the unlicensed driver or obtain a license for it. Once the unlicensed driver is removed, the server must be restarted.
3. Obtain an unlock code for full-time use of the product.

Returned Error Code 0x80040154
This error code is described as "Class not registered."

Possible Cause:
The PC running the server is in a domain, whereas the PC running the client is in a workgroup.

Make sure that all PCs are inside the domain, and that DCOM security is set on both PCs. If that is not possible, refer to the DCOM security instructions for this type of connectivity in DCOM - Secure by Default.

This error code only seems to occur when the client application attempting the server connection is outside the domain in which the server exists. It does not occur when connecting from a client application inside the domain to a server that is outside the domain on a workgroup.

Returned Error Code 0x800401F3
The connection failed while attempting to connect to the server.

This error code means that the ClassID string is invalid (either incorrect or missing). For example, users trying to connect to KEPServerEX that did not load it onto the PC would receive this error in their client application. Users that are utilizing the wrong syntax for a Program ID would also receive this error.

Returned Error Code 0x80040200
An attempt was made to connect to a server, but was unsuccessful and resulted in error code 0x80040200. Passing it to the server with the Get Error string will return "0x80040200: Unable to impersonate DCOM client" or "0x80040200: Unknown OLE status code."

There are two primary reasons why the operating system returns this error.

1. The impersonation settings in DCOM security are no longer at the default settings; thus, the connection attempt is being denied at the operating system level. The DCOM settings must be reset. For more information, refer to DCOM - Secure by Default.

2. A method was requested of the DCOM application that is disabled or not supported. This type of error occurs when trying to perform a method that requires the client group to subscribe when it is not. For example, if a user is attempting an Asynchronous Write but is not subscribed, then that thread is not enabled and the user will receive this error.

Returned Error Code 0x80040202
This error code is returned to the client application from the Windows operating system.

Possible Cause:
A search of the Microsoft Knowledge Base indicates that error code 0x80040202 is a "CONNECT_E_CANNOTCONNECT" error. This 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 common OPC files. This can occur when users attempt to update the server, but the update fails. It can also occur when users install another OPC application that changes one of the files that are used but not all of them.

Re-run the latest KEPServerEX installation to re-synchronize the files. Ultimately, users could delete the "OPCproxy.dll" and "OPCcomn_ps.dll" files. Once deleted, users would then re-run the installation so that new files will be placed there. On 32 bit operating systems, the files are located in the System32 folder; in 64 bit operating systems, the files are located in the SysWOW64 folder.

Important: Deleting and replacing the files could affect other applications. Instead of deleting files or re-running the KEPServerEX installation, users could try the "regsvr32" commands listed in the related solution KEPServerEX: Local OPC Connections Not Functioning.

For more information on this error, refer to Microsoft Knowledge Base Article You may receive an error message when you call the AtlAdvise() function to set up a connection point.

Returned Error Code 0x8007000E
Possible Cause:
This error is more often encountered when launching the OPC Quick Client from LinkMaster than from KEPServerEX. This is mainly due to the way that LinkMaster is designed. When the OPC Quick Client is launched from either product, however, it will automatically create a group for each location that contains Static or System Tags. For example, in KEPServerEX, groups will be generated for the channel, _System, and _Statistics folders. Groups will also be generated for the device and its sub-folders, as well as for any tag groups that were configured in the device. For LinkMaster, groups will be generated for each Link Group and each Link Item. Each group that is created in the client will generate and consume two process threads for the V4.x server and one process thread for the V5.x server (after V5.2). The more groups that are created, the more threads that will be created. When multiple clients are connected to KEPServerEX or LinkMaster, threads will be created for each group that will be added by each client application.

In Windows XP and older operating systems, Microsoft only allows 2024 threads per active process. As such, LinkMaster's 2024 process thread limit can be reached very quickly on a Windows XP operating system. In Windows 2003 and newer operating systems, the number of threads per process is not hard coded and depends on the amount of memory that is available to the operating system. The error code that is returned to a client application when the thread resources are exceeded is "0x8007000E". Any items or groups that are added after this error will fail.

1. Limit the number of groups in the client applications. When using the OPC Quick Client with large projects, manually create a project instead of generating it on launch.
2. On newer operating systems, increase the amount of RAM.

Returned Error Code 0x80070057
This error code is described as "The parameter is incorrect".

Possible Cause:
The OPC Client attempting to connect to the server passed a non-English Locale ID, which is rejected by the server by default. An example of an English Locale ID is "1033".

1. In the server, click File | Project Properties.
2. Next, open the OPC DA Compliance tab and uncheck the Reject unsupported language IDs option. Then, click Apply.
3. Once finished, click OK.
4. At this point, the server should allow connections from clients that are using non-English Language or Locale IDs.

Returned Error Code 0x8007041D (-2147023843)
This error code is described as "The service did not respond to the start or control request in a timely fashion."

Possible Cause:
There are several reasons why this could be happening.

1. File dependencies have failed. OPC is based on OLE, and depends on OLE and RPC-related Microsoft files to operate. This particular error usually indicates that four COM objects may not be registered correctly: "ole32.dll," "oleaut32.dll," "opcproxy.dll," and "opccomn_ps.dll." For information on registering them, refer to the instructions below.

  1. Open the Command Prompt, and type "regsvr32 ole32.dll". A dialog box should appear that states "DllRegisterServer in ole32.dll succeeded." Click OK.
  2. Next, enter "regsvr32 oleaut32.dll". A dialog box should appear that states "DllRegisterServer in oleaut32.dll succeeded." Click OK.
  3. Next, enter "regsvr32 opcproxy.dll". A dialog box should appear that states "DllRegisterServer in opcproxy.dll succeeded." Click OK.
  4. Next, enter "regsvr32 opccomn_ps.dll". A dialog box should appear that states "DllRegisterServer in opccomn_ps.dll succeeded." Click OK.
  5. Next, enter "exit" to close the Command Prompt window. Then, reboot and re-attempt to connect to the server.

    Note: These files need to be properly registered on remote PC's as well if you are doing a remote connection to the server.

Returned Error Code 0x800706BA
Possible Cause:
1. In Windows Server and RPC, this error can occur if the connection is attempted using a different case for the remote server name.
2. The range of ports available to the operating system for DCOM may have been restricted.
3. DCOM and DCOM-enabled applications may not have access to pass through the firewall (which may be a Microsoft, third-party software, or hardware firewall).
4. There may be an issue with the hardware firewall setting.

1. Microsoft has addressed this as a hotfix for Windows Server 2003 SP2, Vista SP2, Server 2008 SP2, Server 2008 R2, Server 2008 R2 SP1, Windows 7, and 7 SP1. For more information, refer to the Microsoft Knowledge Base articles and DCOM Port Range Configuration Problems.
2. For more information on Windows firewalls, refer to the Microsoft Knowledge Base article Connecting Through Windows Firewall.
3. For more information on NAT firewalls, refer to the Microsoft Knowledge Base article DCOM Does Not Work Over Network Address Translation-Based Firewall.

See Also:
New Activations of Remote COM Server May Not Work If Remote Server Has Been Rebooted

Returned Error Code 0x80080005
This error code is described as "Server execution failed."

Possible Cause:
An attempt was made to launch or connect to the server but failed. This is typically because there was a failure to load/register the CLSID in the required amount of time, and is seen with failed installs and when trying to connect to the server from a Terminal Services Console Login.

Related Products