OpenShot Library | libopenshot-audio
0.2.0
|
Handles the opening and closing of DLLs. More...
#include <juce_DynamicLibrary.h>
Public Member Functions | |
DynamicLibrary ()=default | |
Creates an unopened DynamicLibrary object. More... | |
DynamicLibrary (const String &name) | |
DynamicLibrary (DynamicLibrary &&other) noexcept | |
Move constructor. | |
~DynamicLibrary () | |
Destructor. More... | |
bool | open (const String &name) |
Opens a DLL. More... | |
void | close () |
Releases the currently-open DLL, or has no effect if none was open. More... | |
void * | getFunction (const String &functionName) noexcept |
Tries to find a named function in the currently-open DLL, and returns a pointer to it. More... | |
void * | getNativeHandle () const noexcept |
Returns the platform-specific native library handle. More... | |
Handles the opening and closing of DLLs.
This class can be used to open a DLL and get some function pointers from it. Since the DLL is freed when this object is deleted, it's handy for managing library lifetimes using RAII.
Definition at line 39 of file juce_DynamicLibrary.h.
|
default |
Creates an unopened DynamicLibrary object.
Call open() to actually open one.
|
inline |
Destructor.
If a library is currently open, it will be closed when this object is destroyed.
Definition at line 60 of file juce_DynamicLibrary.h.
bool juce::DynamicLibrary::open | ( | const String & | name | ) |
Opens a DLL.
The name and the method by which it gets found is of course platform-specific, and may or may not include a path, depending on the OS. If a library is already open when this method is called, it will first close the library before attempting to load the new one.
void juce::DynamicLibrary::close | ( | ) |
Releases the currently-open DLL, or has no effect if none was open.
|
noexcept |
Tries to find a named function in the currently-open DLL, and returns a pointer to it.
If no library is open, or if the function isn't found, this will return a null pointer.
|
inlinenoexcept |
Returns the platform-specific native library handle.
You'll need to cast this to whatever is appropriate for the OS that's in use.
Definition at line 82 of file juce_DynamicLibrary.h.