OpenLibrary() twice on the same DLL?
Posted: Wed May 29, 2024 11:17 am
Hi all,
I have a project that includes a couple of libraries via IncludeFile. Both of these libraries happen to need functions (not the same functions) from a particular DLL, and so both are setting up prototypes and calling OpenLibrary() to get functions from that DLL.
This means that OpenLibrary() is being called twice for the same DLL. Empirically, this seems to work, but I'm not sure whether this is something that's best avoided.
Is this OK, or a Bad Idea?
I have a project that includes a couple of libraries via IncludeFile. Both of these libraries happen to need functions (not the same functions) from a particular DLL, and so both are setting up prototypes and calling OpenLibrary() to get functions from that DLL.
This means that OpenLibrary() is being called twice for the same DLL. Empirically, this seems to work, but I'm not sure whether this is something that's best avoided.
Is this OK, or a Bad Idea?