OPC UA (CVOpcUa.dll) 14.0
Error Logging Functions

Functions

cvbres_t CVOPCGetLastErrorString (char *Error, size_t &Length)
 Gets the last error as a C string, describing the reason for the last error. More...
 
cvbres_t CVOPCGetLastErrorStringW (wchar_t *Error, size_t &Length)
 Gets the last error as a wide C string, describing the reason for the last error. More...
 
cvbres_t CVOPCResetLastErrorString ()
 Reset the last string which describes the reason for the last error. More...
 

Detailed Description

Functions to access the last error as a string.

Function Documentation

◆ CVOPCGetLastErrorString()

cvbres_t CVOPCGetLastErrorString ( char *  Error,
size_t &  Length 
)

Gets the last error as a C string, describing the reason for the last error.

Note
Error strings are stored thread local.
Parameters
[in]ErrorChar buffer to be filled with the last error message; nulltptr to inquire minimal buffer size.
[in,out]LengthNumber of bytes Error buffer has if Error is not nullptr; if it is nullptr this parameter will contain the minimal number of bytes needed for the Error buffer including zero termination.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • Smaller than zero on error.

◆ CVOPCGetLastErrorStringW()

cvbres_t CVOPCGetLastErrorStringW ( wchar_t *  Error,
size_t &  Length 
)

Gets the last error as a wide C string, describing the reason for the last error.

Note
Error strings are stored thread local.
Parameters
[in]ErrorWide char buffer to be filled with the last error message; nulltptr to inquire minimal buffer size.
[in,out]LengthNumber of bytes Error buffer has if Error is not nullptr; if it is nullptr this parameter will contain the minimal number of bytes needed for the Error buffer including zero termination.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • Smaller than zero on error.

◆ CVOPCResetLastErrorString()

cvbres_t CVOPCResetLastErrorString ( )

Reset the last string which describes the reason for the last error.

Note
Error strings are stored thread local.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • Smaller than zero on error.