ImageGear for C and C++ on Linux v18.8 - Updated
LPFNIG_ERRMNGR_ADD
API Reference Guide > Core Component API Reference > Core Component Callback Functions Reference > LPFNIG_ERRMNGR_ADD

This callback is called each time a new error record is added by any thread.

Declaration:

 
Copy Code
typedef VOID (LPACCUAPI LPFNIG_ERRMNGR_ADD)(
        LPVOID lpPrivate,     
        DWORD dwThreadID,
        UINT nRecord,
        INT iLineNumber,   
        AT_ERRCODE  iCode,
        UINT nLevel,
        AT_INT lValue1,
        AT_INT lValue2,
        LPCHAR lpFileName,
        LPCHAR lpExtratext
);

Arguments:

Name Type Description
lpPrivate LPVOID Private data passed.
dwThreadID DWORD Thread identifier where error happened.
nRecord UINT Index of this record in the stack.
iLineNumber INT Line number where a problem occurred.
iCode AT_ERRCODE Error code.
nLevel UINT Level of the error.
lValue1 AT_INT Specific value identifying the reason for an error.
lValue2 AT_INT Specific value identifying the reason for an error.
lpFileName LPCHAR Pointer to a string holding a filename or NULL if not available.
lpExtratext LPCHAR Pointer to a string holding extra info or NULL if not available.

Return Value:

None

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
VOID ACCUAPI ErrGlAddCB(
        LPVOID   lpPrivate,     /* Private data passed in.  */
        DWORD    dwThreadID,   /* Thread identifier where record added.     */
        UINT     nRecord,     /* index of this record in the stack.        */
        INT      iLineNumber,  /* line number where problen occurred.       */
        AT_ERRCODE       iCode,     /* error code.        */
        UINT      nLevel,    /* level of the error. */
        LONG    lValue1,
        LONG     lValue2,
        LPCHAR   lpFileName,   /* filename str ofr NULL if not present. */
        LPCHAR   lpExtratext   /* extra text info about error. */
);
{
        char     szOutput[1024];
        sprintf( szOutput, "Global CallBack - new error record
added:\nThread=%i\nRecord=%i\nLine=%i\nCode=%i\nLevel=%i\nValue1=%i; Value2=%i,\nFile
Name: %s\nExtra Text: %s", 
                dwThreadID, nRecord, iLineNumber, iCode, nLevel, lValue1, lValue2, lpFileName,
lpExtratext );
        //AfxMessageBox( szOutput );
        ::MessageBox(NULL, szOutput, "THREADS", MB_OK);
}