I'm trying to collect some data for an article. Just curious if anyone would like to share a success story using a hook (aka hooking a sysTrap). I'm not looking for anything formal, just your goal, the trap you hooked, and the outcome. Or even some ideas that you never actually coded, it doesn't matter. For example: I needed to intercept sleep/wake for a very good (though very complicated) reason. To do this, I hooked SysHandleEvent in a reset app (a simple app that was burned into ROM, and upon sensing a reset launch code, reinstalls all of the hooks so they're ALWAYS there). In SysHandleEvent(), I would keep an eye out for a keyDownEvent whose chr was an autoOffChr. Or, a chr whose (modifiers & commandKeyMask ) && (chr == powerOffChr). That would cover all the cases that would put the device into sleep mode -- when the autoOffTimer elapsed, and when the power button was pressed. When I'd see one of these, I would do MyOwnSleepCode(). Using a shared library's sleep() entry point was not an option because I actually needed to prevent the device from sleeping under certain circumstances. I suspect the bulk of responses (if any!) will probably have to do with EvtGetEvent and SysHandleEvent. That's fine! Thanks, -jeff
