You may be able to do this using the debugger API, but this is a really really bad idea.
On the one hand, working with installed debugger hooks can be slower - but more importantly, interfering with the framework code can easily lead to unexpected behavior. Do you know exactly how this method is used in all possible scenarios even in your own application?
It could also have undesirable legal consequences, although you should consult with a lawyer about this.
I personally would give up this line of thinking and try to devise another way to accomplish what you are trying to do.
source
share