carb::extras::getLibraryHandleByFilename

Defined in carb/extras/Library.h

inline LibraryHandle carb::extras::getLibraryHandleByFilename(const char *libraryName, LibraryFlags flags = 0)

Attempts to retrieve a library’s handle by its filename.

Parameters
  • libraryName[in] The name of the library to retrieve the handle for. This may either be the full path for the module or just its base filename. This may be nullptr to retrieve the handle for the main executable module for the calling process. If the fLibFlagMakeFullLibName flag is used, the library name may omit any platform specific prefix or file extension. The appropriate platform specific name will be generated internally using createLibraryNameForModule().

  • flags[in] Flags to control the behavior of the operation. This defaults to 0.

Returns

The handle to the requested library if it is already loaded in the process. Returns nullptr if the library is not loaded. This will not load the library if it is not already present in the process. This can be used to test if a library is already loaded.