Microsoft's Detour FAQ documentation indirectly says that statically linked function cannot be detoured under question Why don't I see any calls to my detour of malloc?
But I am able to detour my own statically linked library functions by finding the address using DetourFindFunction()
. I believe it uses debug symbols to find it. I have tested enough and I didn't see any abnormal behaviour with this approach? What could be the reason behind Microsoft making such statements in FAQ?
Also if the inline function expansion is enabled under visual studio project configuration, DetourFindFunction()
fails to find the address. Why does it fail and are there any other ways to find the address?