This project is read-only.
3

Closed

Exceptions can not be thrown

description

Currently, EasyHook does not support throwing exceptions from within hook handlers... I will fix this in the next release coming with my API Monitor Demo in early Sep 2008...
Closed Aug 24, 2015 at 1:29 AM by spazzarama

comments

norm2782 wrote Mar 9, 2010 at 10:35 AM

Is this already fixed..?

wrote Jul 13, 2010 at 3:22 PM

wrote Mar 12, 2012 at 1:49 PM

VincentGee wrote Jul 14, 2012 at 1:56 AM

Don't know if anyone is watching this, but I am assuming that they are talking about throwing exceptions in the *_injected class which bubble back through the interface to the program which set the hook?

The current ProcessManager example shows how to pass the exceptions out through the interface. Since you can't step through the running injected code (Well since it's operating inside the victim app) the only way to find out about exceptions would be to send them through the interface.,

Is this what this issue is discussing?

spazzarama wrote Jul 17, 2012 at 2:03 AM

I'm not sure about the original intent of this issue, but I believe it was around exceptions that might occur within a hook handler (e.g. the CreateFile_Hooked method of ProcMonInject). It would require some further investigation to determine if there is in fact already a solution for how this is currently handled and whether this is how it should be handled. This would be within the trampoline code in the C project.

It is possible to solve this issue as Vincent has suggested simply by always using a try...catch and report back to host via the interface as shown in the ProcessMonitor example but also within your hook handlers.

Another option, based on what is done in ProcessMonitor, would be to flesh out an already previously started base IPC implementation to facilitate the plumbing for this so it doesn't have to be redone. I haven't taken a good look at this to see how usable / far along that development made it. Perhaps some kind of improved version of the message loop that is within the ProcessMonitor example?

wrote Feb 22, 2013 at 1:15 AM

wrote Aug 24, 2015 at 1:29 AM