ImageGear for C and C++ on Windows v19.6 - Updated
IG_err_record_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Error Functions > IG_err_record_get

This function obtains information about the record with the given index from the error stack.

Declaration:

 
Copy Code
AT_BOOL ACCUAPI IG_err_record_get(
   UINT nIndex,
   LPCHAR lpszFileName,
   UINT nFNameSize,
   LPINT lpnLineNumber,
   LPAT_ERRCODE lpnCode,
   LPUINT lpnLevel,
   LPAT_INT lplValue1,
   LPAT_INT lplValue2,
   LPCHAR lpExtraText,
   UINT nETextSize
);

Arguments:

Name Type Description
nIndex UINT Zero based index of the record.
lpszFileName LPCHAR Pointer indicating where to return the source's file name where the error occurred.
nFNameSize UINT The buffer memory size of lpszFileName.
lpnLineNumber LPINT Pointer indicating where to return the line number where the error occurred.
lpnCode LPAT_ERRCODE Pointer indicating where to return the error code.
lpnLevel LPUINT Pointer indicating where to return the error level.
lplValue1 LPAT_INT Pointer indicating where to return the first associated long value.
lplValue2 LPAT_INT Pointer indicating where to return the second associated long value.
lpExtraText LPCHAR Pointer indicating where to return additional text description.
nETextSize UINT Size of the memory buffer lpExtraText.

Return Value:

Returns TRUE if the record information has been successfully retrieved; returns FALSE otherwise. Errors that occurred during this function call are not appended onto the error stack.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code
AT_ERRCOUNT iErrCount, i;
CHAR         FileName[_MAX_PATH];
INT          nLineNumber;
AT_ERRCODE   nCode;
UINT         nLevel;
// get all records from error stack.
iErrCount = IG_err_count_get( );
for( i = 0; i<iErrCount; i++ )
{
    IG_err_record_get( i, FileName, sizeof(FileName), &nLineNumber, &nCode, &nLevel, NULL,
NULL, NULL, 0 );
    //...
}

Remarks:

This index is the general index of all records on the stack. The difference between this function and IG_err_error_get is that this function enumerates all records rather than only records of a given level.

See Also

IG_err_callback_get