-
Notifications
You must be signed in to change notification settings - Fork 378
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
Load more than one custom dll possible? #76
Comments
Umh... I know I am commenting something quite old, but here you can find the hook for the API you need. So, if your DLL has only that dependency, I guess you should be fine. |
Yes a bit old, trying to remember myself..but I think the question was meant as a general question regarding possibility to load multiple dll:s, i.e. 'yes' or 'no'. As I recall my conclusion was 'no' and would just like to get confirmation on that. |
I am quite sure that the short answer to your question is: no. i.e. if your .dll calls some of the kernel32.dll APIs, you cannot use loadlibrary to load your .dll along with kernel32.dll to make your dll able to use the exported functions of kernel32.dll. Anyway, keep in mind that this does not mean you cannot load your dll at all if it calls third-party APIs. You can still load it, using the loadlibrary's hooks. I hope I explained myself better this time. |
Understood and as I expected. Thanks, btw I'm using loadlibrary in my app successfully so I'm very pleased with your time and effort to put this together! |
This can be considered a duplicate of #101 |
I have successfully used loadlibrary to load a custom dll and used some of its functions.
However one of the dll functions has a dependency to the GetVersionExA in the kernel32.dll.
So I used 'detours' to create a myhook.dll that replaces this function. This worked fine on Windows. However on Linux side I realized that I pretty much only replaced the kernel32.dll dependency with myhook.dll dependency. And so the issue remains.
If only I could somehow load myhook.dll also? Or is there some other way? Or do I need Wine? Its all a bit of black magic right now..
The text was updated successfully, but these errors were encountered: