Skip to content
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

Question regarding static compiled dll /headers #120

Closed
duketwo opened this issue Mar 27, 2022 · 1 comment
Closed

Question regarding static compiled dll /headers #120

duketwo opened this issue Mar 27, 2022 · 1 comment

Comments

@duketwo
Copy link

duketwo commented Mar 27, 2022

Hey,

I've created a msvc dll project and installed the static version of polyhook2 with vcpkg. Enabled the usage of static libs in the vcpkg settings and enabled the /MT flag. I can hook dx11present without any issues in that scenario with the directx11 headers included. But the application where I'm injecting my dll into has the python27.dll loaded, which I want to use too. Is there any way that I can include the python headers in my project and my dll is then using the already loaded python27.dll? Like in a dynamic context? Or do I need to use loadlib/getmodhandle -> getprocadress?

Also, do system dll imports/includes behave differently in static environments?

@duketwo duketwo changed the title Question regarding static compiled dll Question regarding static compiled dll /headers Mar 27, 2022
@stevemk14ebr
Copy link
Owner

Is there any way that I can include the python headers in my project and my dll is then using the already loaded python27.dll

Depends on how you load your dll. If you load via a standard mechanism like loadlibrary and your headers match the correct DLL version in the target process I'm fairly sure it should work just fine. If you're manual mapping, it depends on if your mapper supports checking the already loaded modules. Either way, that's something you need to test and is not related to this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants