Boost.DLL
Boost.DLL copied to clipboard
Provide a no-load flag to enable use of shared_library with maybe-already-loaded libraries
I'd like to use the functionality of Boost.DLL to access libraries that are already loaded in the process, but be able to avoid loading libraries that are not already loaded. Essentially:
boost::dll::shared_library foo("/path/to/some/library", load_mode::dont_load);
if (foo.is_loaded())
{
// look up functions
}
On POSIX, this would equate to use of RTLD_NOLOAD with dlopen, and on Windows the use of GetModuleHandle() instead of LoadLibary().