> > // Reset the system Trap Address
> > if (cardNo==cardNoToDelete && dbID==dbIDToDelete) {
> > SysSetTrapAddress(0xA2E2, oldKeyboardPtr);
> > SysSetTrapAddress(0xa042,oldDmDeletePtr );
> > }
> > return DmDeleteDatabase(cardNoToDelete,dbIDToDelete);
> > }
> >
> > the problem is taht when it do (dbID==dbIDToDelete), it cause a bus error.
> > when I just compare the cardNo, it works.
> > can anybody help me ?
>
> Since this is being called when your program is not active,
> you have no access to your globals oldKeyboardPtr and
> oldDmDeletePtr. (I'm assuming they're globals since I didn't
> see how you declared them in the source that you posted.)
> You'll need to store them in a different way (like using the
> feature manager with FtrSet/Get) to have access to them when
> your patched sysTrap is called.
I have decleard the odlKeyboardPtr and oldDmDeletePtr, the function can
access it. any other possiblity ?
regard,
Eric