Transact C client library


sp_insert


Append bytes to the end of a data file.

ANSI Prototype

_kernel_oserror *sp_insert(const TYPSID, const void *, TYPOID *const, const void *, const mfpos_t);

Possible errors

Sample code

{
mfpos_t zbegin;
TYPSID gsid;
TYPOID idint;
const char pdata[4] = { 'e', 'f', 'g', 'h' };
const char *idext= "<Obey$Dir>.Datafile";
_kernel_oserror *e;
/* gsid must be given a value before calling sp_insert */
e= sp_insert(gsid, idext, &idint, (const void *) pdata, (mfpos_t) sizeof(pdata));
if(e)	wimp_report_error(e, 0,0,0,0);
/* For subsequent calls refering to the same data file,
   the app. can now use the idint parameter instead of
   the idext parameter.
   Eg. e= sp_insert(gsid, NULL, &idint, ...); */
}