ImageGear for C and C++ on Windows v19.3 - Updated
IG_REC_progress_CB_register
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Callback Functions > IG_REC_progress_CB_register

Registers a callback address for the LPFNIG_REC_PROGRESS_MONITOR progress monitoring function.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_progress_CB_register(
   LPFNIG_REC_PROGRESS_MONITOR pCallBack,
   LPAT_VOID lpUserData
);

Arguments:

Name Type Description
pCallBack LPFNIG_REC_PROGRESS_MONITOR Address of the callback entry point in the application.
lpUserData LPAT_VOID Pointer to the user data to be passed to the callback function.

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
//...
//enumIGRecError __stdcall func(LPAT_REC_PROGRESS_MONITOR mod, void *pContext)
//{
//    return IGE_REC_EXT_OK;
//}
//...
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
LPFNIG_REC_PROGRESS_MONITOR    pCallBack = &func;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_progress_CB_register(pCallBack, NULL);

//...

ErrCount += IG_REC_image_recognize(higRecImage);

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);