Functions to access the last error as a string.
◆ 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] | Error | Char buffer to be filled with the last error message; nulltptr to inquire minimal buffer size. |
[in,out] | Length | Number 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] | Error | Wide char buffer to be filled with the last error message; nulltptr to inquire minimal buffer size. |
[in,out] | Length | Number 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.