SUMMARY d_rdcurr(currbuff,cursize) DB_ADDR **currbuff; int *cursize;
ARGUMENTS currbuff A pointer to a DB_ADDR pointer variable which will contain a pointer to a d_rdcurr allocated buffer which contains the currency table.
currsize A pointer to an integer variable which will contain the size of the buffer in bytes.
DESCRIPTION This function will allocate a memory buffer and copy the contents of the currency table (and timestamps, if used) into that buffer. A pointer to the copy of the currency table is returned in currbuff and the size of the buffer in bytes is returned in currsize. The size is provided in case the application needs to save the table in a file for restoration in a later execution of the database program.
This functions is intended to be used whitch d_wrcurr to save and restore the state of a database routine before or after other routines are called for which it is unknown how the currency might changed.
CURRENCY CHANGES None.
RETURN CODES
-904 S_NOMEMORY Unable to allocate enough memory for currbuff
EXAMPLE
DB_ADDR *ctab; /*save currency table*/ int csize; /*size of saved currency table */ .. /* save currency tables */ d_rdcurr(&ctab,&csize); .. /* do some other processing */ /* restore currency tables */ d_wrcurr(ctab);