Saludos maestro y gracias por la sugerencia.
I'm sorry I wasn't more specific.
Consider this declaration:
- Code: Select all Expand view RUN
//-------------------------------------------------------------------------------
HB_FUNC( TOCRFROMSCANNER )
{
TOCRJOBINFO_EG JobInfo_EG;
TOCRRESULTSEX_EG* Results = 0;
long JobNo;
long Status;
long NumImages = 0;
long CntImages = 0;
HANDLE *hMems;
HANDLE hMMF = 0;
HB_WCHAR Msg[10240];
HB_WCHAR FullText[10240] = L"\n"; //final returning string
char LogMsg[ TOCRJOBMSGLENGTH ] ;
HB_WCHAR pageBreak = L'\u000C';
memset( Msg, 0, sizeof( Msg ) ); //make sure Msg is empty
trimTrailing(FullText);
...
for (long ImgNo = 0; ImgNo < NumImages; ImgNo++) {
//show progress using a callback func here
//callback func registered from harbour calling func.
if ( hMems[ImgNo] ) {
sprintf( LogMsg, "Processing image # %ld.", ImgNo );
LogData( "TOCRerr.log", LogMsg, MAX_LOG_SIZE ) ;
// convert the memory block to a Memory Mapped File
hMMF = ConvertGlobalMemoryToMMF( hMems[ ImgNo ] );
...
I think in order to be able to call a progress function from inside the for loop, we would need to register a callback function that can update a progress bar declared on the calling .prg.
On the Harbour forum Laiton suggested taking a look at hbcurl source where there seems to be something similar. I will try to investigate that.
I will try any other suggestion.
Thank you.