Hi,

I hope I'm not repeating anything already discussed here.

I have a piece of code that used to patch ScrDrawChars trap for me. The problem
is, it's not working on PalmOS 3.5 anymore. When I try to debug my source codes,
the program never enters MyScrDrawChars() now, i.e. standard trap is being used.

Might be a stupid question, but: Do I need to recompile my project using SDK 3.5
for it to work on OS 3.5? And if I do so, will the
application still work on the older OS versions? Or is there something else that
I'm doing wrong.

Thanks,
Sebastian

--------------------------------------------------------
void (*OldScrTrap)(WinPtr, SWord, SWord,
       SWord, SWord, SWord,
       SWord, SWord, SWord,
       CharPtr, Word, FontPtr);

extern void MyScrDrawChars(WinPtr pWindow, SWord xLoc, SWord yLoc,
       SWord xExtent, SWord yExtent, SWord clipTop,
       SWord clipLeft, SWord clipBottom, SWord clipRight,
       CharPtr chars, Word len, FontPtr fontPtr)
{
      // ...
      // do some operations on chars
      // ... and call the standard function:
      (*OldScrTrap)(pWindow, xLoc, yLoc,
        xExtent, yExtent, clipTop,
        clipLeft, clipBottom, clipRight,
        chars, len, fontPtr);
}

--------------------------------------------------------
// and this patches the trap at the beginning of my app
(VoidPtr)OldScrTrap = SysGetTrapAddress(sysTrapScrDrawChars); //0xa0ed
SysSetTrapAddress(sysTrapScrDrawChars, &MyScrDrawChars);

--------------------------------------------------------

















-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to