Standard OPC Error Codes

An OPC client can change the value of the OPC items exposed by the OPC server that have read/write access rights. The result of this write operation is translated in an error code that follows the OPC standard and finally forwarded from the OPC server to the OPC client requesting the operation.

The following list shows the possible error codes. The way the error code displays (text or number) depends on the OPC client in use.

Error Code (text or number)

Description

Text

Number

S_OK

0x00000000

Write operation successful.

OPC_E_BADTYPE

Or

DISP_E_TYPEMISMATCH

0xC0040004

Or

0x80020005

The passed data type cannot be accepted for this item.

OPC_E_BADRIGHTS

0xC0040006

The item is not writeable.

OPC_E_INVALIDHANDLE

0xC0040001

The passed item handle is invalid.

OPC_E_UNKNOWNITEMID

0xC0040007

The item is no longer available in the server address space.

OPC_E_RANGE

0xC004000B

The value is out of range.

E_FAIL

0x80004005

Generic error: the function was unsuccessful.