-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My DLL stop to working after MH_Initialize #89
Comments
I think this is not related to MinHook, it's just deadlock in DllMain because it's useless for anything than simple variables initialization: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices |
Thank you for share !! Do you have an easy example of source code in DllMain with MinHook that work ? My source code originally work fine with ms detours, but not with MinHook. Thanks ! |
@luca2125 did you manage to find a way to initialize minhook in your dll? having the same issues as you |
For the moment I use ms detours that probably is not best solution, but In my case work. |
You have two project files: MinHook and libMinHook - use the second one in your solution and add reference to libMinHook in your project then Visual Studio will automatically build and link MinHook when you build your project. libMinHook should be configured to output static library, so your project should not need any other dll files |
Hi,
I have a full working project with ms detours and becouse I like to switch to MinHook I have replace detours code with MinHook equivalent.
I use VS2017 v141 SDK 8.1. To do the test I used "MinHook.x86.lib" v 1.3.3 in this repository (not compiled by me).
This is my reduced test code:
For some strange reason my project don't do nothing if I add this line:
if I remove this work normally.
I attach my complete project.
BattleZone Redux (MinHook).zip
and my setting:
Can you help me please ?
Thank you !!
The text was updated successfully, but these errors were encountered: