Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

GETCBRBLST

Returns the current rebuild callback state.

Declaration

ctCONV pctRBCBST ctDECL GETCBRBLST (VOID)

Description

Specific rebuild callback information can be passed back to the calling client via this structure. This is a useful feature that allows canceling a rebuild from the rebuild callback function. A call to this function returns a pointer to the rebuild callback state structure ctrbcbst.

typedef struct ctrbcbst {

LONG rcblen; /* number of data bytes in structure */

LONG rcbhw; /* counter high word value */

COUNT rcbrc; /* rebuild callback return code */

} ctRBCBST, ctMEM * pctRBCBST;

/* Size of rebuild callback state structure, version 1 */

#define ctRCBLEN_V01 10

Return Values

Returns a pointer to the ctrcbst state structure.

Example

To enable a clean rebuild cancel from within a callback, consider the following.


void myRebuildCallback( LONG counter, TEXT event, pTEXT message ) {

pctRBCBST state;

extern int cancel;

if( cancel ) {

state = GETCBRBLST();

/* stop the rebuild */

state->rcbrc = 1;

}

}

See Also

SetCallbackOnRebuild

TOCIndex