Err myEvtProcessSoftKeyStroke(PointType * start, PointType * end) { // Get the old trap address set by the extensions manager, // e.g., HackMaster, X-Master, or TealMaster. // See http://www.daggerware.com/hackapi.htm and // http://www.linkesoft.com/english/xmaster/developer.html // for the system extension ("hack") protocol. UInt32 value; thisInterface oldTrap = (FtrGet(CREATORID, TRAPID_PROCESSSOFTKEYSTROKE, &value) == errNone)? (thisInterface)value : 0; if (!handleProcessSoftKeyStroke(start, end)) { goto passthru; } return errNone; passthru: return ((oldTrap) ? oldTrap(start, end) : errNone); }
UInt32 __ARMlet_Startup__(UInt32 alertId, char * s1, const char * s2, const char * s3){ pfnFrmCustomAlert oldTrap; FtrGet(MY_CRID, RESID, (UInt32 *)&oldTrap); return oldTrap(alertId, "test", s2, s3); }