| View previous topic :: View next topic |
| Author |
Message |
Macadelic How do I cheat?
Reputation: 0
Joined: 23 Apr 2020 Posts: 4
|
Posted: Thu Apr 23, 2020 1:50 am Post subject: Can't inject my DLL. Force load module failed: KERNEL32 |
|
|
Hello, I am facing a problem that does not come from cheat engine but I do not know where to find my answer.
Basically I created a DLL which works very well which I inject each time manually with CE
When I load my dll before the first loading in game, I have an error
Force load module failed: KERNEL32! SleepConditionVariableSRW.
But when I wait after the first loading of the game, my dll injects correctly.
I'm compiling my project via Visual Studio 2019, and I think it's a build properties issue with runtime dependencies. But I tried everything I did not succeed.
I am compiling in Release x86 and the Runtime Library is Multi-threaded (/ MT)
(I also tried to put the other choices but nothing works)
So I really don't see what else I can do.
| Description: |
| I have try every possibility |
|
| Filesize: |
39.9 KB |
| Viewed: |
12746 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Thu Apr 23, 2020 3:19 am Post subject: |
|
|
call lua command waitForExports() before dll injection
or else try reinitializeSymbolhandler(true)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Macadelic How do I cheat?
Reputation: 0
Joined: 23 Apr 2020 Posts: 4
|
Posted: Thu Apr 23, 2020 3:25 am Post subject: |
|
|
| My problem is that I use cheat engine to inject my dll just to verify that it works, then I use an autoinject for my game.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Thu Apr 23, 2020 3:38 am Post subject: |
|
|
You have to wait till the game has fully loaded before dll injection works. You can't inject a dll before the entrypoint has been executed
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Macadelic How do I cheat?
Reputation: 0
Joined: 23 Apr 2020 Posts: 4
|
Posted: Thu Apr 23, 2020 5:40 am Post subject: |
|
|
| Yes but I do not think that the problem comes from there, because with the same version of the dll if I withdraw all my menu and leave that the main thing it works at startup, it is just this Kernel32SleepConditionVariableSRW which prevents the execution of my dll . I don't know what it could be.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Thu Apr 23, 2020 6:05 am Post subject: |
|
|
yes
Kernel32SleepConditionVartiableSRW is not a real export in kernel32 but a redirect to api-ms-win-core-synch-l1-2-0.SleepConditionVariableSRW
and that one is likely a redirect to kernelbase.SleepConditionVariableSRW
See if you can compile your dll without having that in there, or fix the force load module code (e.g in ce you can manually bypass that issue by registering SleepConditionVariableSRW and point it to kernelbase.SleepConditionVariableSRW )
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Macadelic How do I cheat?
Reputation: 0
Joined: 23 Apr 2020 Posts: 4
|
Posted: Thu Apr 23, 2020 6:42 am Post subject: |
|
|
Ah interesting, but what I don't understand is why it crashes, does my DLL need this function and it can't find it? If that's what I don't understand, it should be compiled with everything it needs right?
Thank you for your answers
|
|
| Back to top |
|
 |
|