EmSACAN_GetLastError
Prototype
wchar_t *EmSACAN_GetLastError(
emsacan_handle_t Handle,
wchar_t *pErrorMessage,
int MaxMessageLength );
Description
Copies the last error message after a failed API call.
Parameters
| Parameter | Direction | Type | Description |
|---|---|---|---|
Handle | in | emsacan_handle_t | Session handle, or NULL for last process-wide error. |
pErrorMessage | out | wchar_t | Buffer to receive the message (wide string). |
MaxMessageLength | in | int | Size of pErrorMessage in *characters(not bytes). |
Example
wchar_t msg[256];
EmSACAN_GetLastError(handle, msg, 256);
wprintf(L"Error: %s\n", msg);
