hook c library function return 0, but not work by inject dll.
I hook strcmp function success, and it take effect in app(.exe) code. But it doesn't work if hook strcmp function in dll while inject the dll to app(.exe)
attachment is my code, could you please answer me? thks
It's possible that the application you are injecting into statically links the CRT, or uses a different (older or newer) version of the CRT.
It's possible that the application you are injecting into statically links the CRT, or uses a different (older or newer) version of the CRT.
I used the same function and the same header, compile them together with VS. attachment is my code, could you please fix it ?
I can't check your code because it gets flagged as virus and autodeleted. Can you upload it on GitHub?
https://github.com/LickBag/DetourDemo
The inject tool Xenos.exe is from here: https://github.com/DarthTon/Xenos
Any progress @LickBag
These take effect only in Debug mode
If its working in debug but not in release mode its likely that the function is inlined and not actually called. Just because a function has a header signature doesn't mean its part of the DLL, it could be part of the LIB and the linker can decide whether to inline or call it.