We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The library makes extensive use of GetModuleHandle(NULL) to obtain the instance handle. This is discouraged, as it does not work for targets that are not executables, such as DLLs.
A possible solution for this would be to use the __ImageBase linker pseudovariable, which is intended for static libraries as described here.
This trick has also been used in the Windows Implementation Library for C++ which has extensive usage:
https://github.com/microsoft/wil/blob/master/include/wil/win32_helpers.h#L513-L514
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The library makes extensive use of GetModuleHandle(NULL) to obtain the instance handle. This is discouraged, as it does not work for targets that are not executables, such as DLLs.
A possible solution for this would be to use the __ImageBase linker pseudovariable, which is intended for static libraries as described here.
This trick has also been used in the Windows Implementation Library for C++ which has extensive usage:
https://github.com/microsoft/wil/blob/master/include/wil/win32_helpers.h#L513-L514
The text was updated successfully, but these errors were encountered: