ImageGear for C and C++ on Windows v19.7 - Updated
IG_REC_error_desc_get
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Utility Functions > IG_REC_error_desc_get

Returns recognition error description by the error code.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_error_desc_get(
   enumIGRecError nErrCode,
   AT_CHAR* lpBuffer,
   AT_INT nBufferSize
);

Arguments:

Name Type Description
nErrCode enumIGRecError Code of the recognition engine error.
lpBuffer AT_CHAR* Buffer to receive the error description.
nBufferSize AT_INT Size of the buffer. Use IG_REC_error_desc_len_get function to retrieve the required buffer size.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
AT_ERRCODE ErrCode = 0;
AT_INT ExtErrCode = 0;
AT_INT iBufSize = 0;
AT_CHAR* lpszBuffer = 0;

//...

IG_err_record_get(0, NULL, 0, NULL, &ErrCode, 0, &ExtErrCode, NULL, NULL, 0);

ErrCount += IG_REC_error_desc_len_get((enumIGRecError)ExtErrCode, &iBufSize);

lpszBuffer = (AT_CHAR*) malloc(iBufSize);
if(lpszBuffer)
{
    ErrCount += IG_REC_error_desc_get((enumIGRecError)ExtErrCode, lpszBuffer, iBufSize);
    free(lpszBuffer);
}