Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Rebuild/Compact Utility Callback Feature

SetCallbackOnRebuild() sets a pointer to a callback function that is periodically called by the file reconstruction functions RebuildIFile(), RebuildIFileXtd(), CompactIFile(), and CompactIFileXtd(). The callback function can be used for progress notification and to implement a custom user interface for rebuild utility programs.

Within your application, create a function conforming to the prototype below:

void CallbackProc(ULONG tick, TEXT flag, TEXT* text);

Call SetCallbackOnRebuild() with a pointer to this function and a step value determining the polling frequency for the callback function. Your callback procedure can handle or ignore the various returns at your option. Our ctrblex.c example uses the information to display a progress bar.

To enable the callback feature, set the RB_CALLBACK define in ctoptn.h or the ctree.mak that creates ctoptn.h.

See the ctrblex.c example and SetCallbackOnRebuild for additional information.