Dear all:

I was just able to compile, link, and load my hack
program which is just a dummy function. I assert this
by looking at the resource of the prc file I have:

TRAP 1000
code 1000
tAIN 3000
tver 1

I was using XMaster and XMaster does detect my hack
function and put: SysHandleEvent in the Patches field.
However, when i click on the Status and set it to
Active. Boom! Fatal Exception [reset]. 

FYI the way I compile and link are:

pilrc resource.rcp
m68k-palmos-gcc charhack.c -o hack -nostartfiles
m68k-palmos-obj-res hack
cp hack code03e8.grc
cp code0001.hack.grc code0001.grc
build-prc hack.prc -t HACK "DemoHack" dmHK *.bin
code03e8.grc code0001.grc

Please have a look at few lines code below and help me
to solve this fatal exception.

The code (few lines only)
-------------------------
charhack.c
------
#include <PalmOS.h> // standard Palm OS Header
#include "charhack.h"

Boolean MySysHandleEventTrap (EventPtr event)
{
   Boolean (*oldtrap)(EventPtr); 
   UInt32 temp; 
   Boolean handled;

   FtrGet(1234,trapIDSysHandle,&temp);
   oldtrap=(Boolean (*)(EventPtr))temp; 
   handled=oldtrap(event);
   return handled;
}

charhack.h
----------
#define trapIDSysHandle         1000
#define trapnumSysHandle                41129

resource.rcp
------------
#include "charhack.h"

APPLICATIONICONNAME ID 3000 "Char-Hack"
VERSION ID 1 "1.0"
TRAP ID trapIDSysHandle trapnumSysHandle

__________________________________________________
Do You Yahoo!?
Play now and stand a chance to win cash prizes! 
http://yahoo.com.sg/millionaire

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to