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

Returns a size of buffer for the error description.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_error_desc_len_get(
   enumIGRecError nErrCode,
   LPAT_INT lpDescSize
);

Arguments:

Name Type Description
nErrCode enumIGRecError Code of the recognition engine error.
lpDescSize LPAT_INT Pointer to the variable to receive the 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 = IGE_SUCCESS;
AT_INT ExtErrCode = 0;
AT_INT iBufSize = 0;
AT_CHAR* lpszBuffer = NULL;

//...

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);
}