Code Changes
/* start */
int returnedid =
mpapistart(apiid); //int apiid = use case
id
if
(retrunedid!=apiid)
{
// do some error processing and Return
}
//Do some
processing on the use case
//e.g. a
transaction
/* stop */
const struct mpapi
*papi; // Prepare for the
stopping
void *const
*pbt;
// Prepare for the stopping
papi =
mpapistop(apiid); // Do a actual stop
if
(papi==NULL)
{
// do error
processing and return
}
else
{
// ampolice have
returned the array of ampai structs and now you can do processing
over them
for (;
papi->addr; ++papi)
{
fprintf(stderr, "%08X %6d -->",
papi->addr, papi->size);
for (pbt =
papi->pbtrace; *pbt; ++pbt)
fprintf(stderr, " %08X",
*pbt);
fprintf(stderr,
"\n");
}
}