What is the function that you are trying to use?
- InterceptRemove, to remove a hook
What is the expected output? What do you see instead?
- Expected: InterceptRemove returns True
- Observed: InterceptRemove returns False
Please provide any additional information below.
The bug is in the call to VirtualFree. It is called passing the size of the
trampoline (eg, 42 bytes.) However, according to MSDN's VirtualFree
documentation:
"dwSize ... If the dwFreeType parameter is MEM_RELEASE, this parameter must be
0 (zero)."
I can verify that if I change the DDetours code to pass a size of 0, instead of
the TrampolineSize variable, VirtualFree succeeds.
Please note this issue was found by vitalyg2 of CnPack, not by me - see
https://github.com/cnpack/cnwizards/pull/3 (a pull request from me to integrate
DDetours into CnPack - halfway down you can see discussion about this method
failing.) However I have tested and can verify the problem and found the
solution.
Original issue reported on code.google.com by vintaged...@gmail.com on 16 Aug 2014 at 11:03
Original issue reported on code.google.com by
vintaged...@gmail.com
on 16 Aug 2014 at 11:03