Quote:
Originally Posted by high9
I mean, when you detour you generally copy the instructions (trampoline) you are overwriting with the jump. Don't delete the copied instructions. That way when you unhook it can still execute the copied instructions and get back.
|
ah, so you mean, the trampoline should not be deleted?
ok, this idea is new for me

Could you give me an example? In which real world situation you could need this? If you can, I will add a flag for keeping the trampoline.
edit:
Ok, tomorrow I will finish the getOpLen method and I will be able to post the full detours class
edit2:
ah, now I remember!
to the include guards again:
Everything works fine, if the header is only included in one .cpp.
But if I include it in a second file I get an "already defined"-error.
The include guards are only to avoid double defining in one .cpp file and pragma once works global!