A89: Event Handlers......


[Prev][Next][Index][Thread]

A89: Event Handlers......




I want to install a new event handler (using EV_hook like Doors), but there 
is a problem. If doors or any compatable kernel that uses SHIFT+ON to launch 
the program called doors (and what kernel doesn't?) is installed, then my 
handler will overwrite the pointer to the kernel's and SHIFT+ON will no 
longer work! I need a way to find the address/pointer of the allocated memory 
the kernel stores this handler code in so I can call it at the end of my 
handler (does that make sense?). Also, as I am doing this in C, is there a 
way I can determine the size of the compiled function so I can copy it to a 
block of memory (need to copy the handler function to a block of memory and 
lock it so the function can be called). I need to do something like 
memcpy(*my_hook_function, pointer_to_allocated_memory, num_of_bytes), but I 
need num_of_bytes. Hope this makes sense, and thanks for any help anyone can 
give me.

      - Josh



Follow-Ups: