-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Windows: Avoid GetModuleHandle(NULL) #2300
Copy link
Copy link
Closed
Description
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels