DynamicLibrary class final
A dynamically loaded native library.
A dynamically loaded library is a mapping from symbols to memory addresses. These memory addresses can be accessed through lookup.
- Available extensions
Constructors
- DynamicLibrary.executable()
-
Creates a DynamicLibrary containing all the symbols of the running
executable.
factory
- DynamicLibrary.open(String path)
-
Loads a library file and provides access to its symbols.
factory
- DynamicLibrary.process()
-
Creates a DynamicLibrary holding all global symbols.
factory
Properties
-
handle
→ Pointer<
Void> -
The opaque handle to the dynamic library.
no setter
- hashCode → int
-
The hash code for a DynamicLibrary only depends on the loaded library.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes this dynamic library.
-
lookup<
T extends NativeType> (String symbolName) → Pointer< T> - Looks up a symbol in the DynamicLibrary and returns its address in memory.
-
lookupFunction<
T extends Function, F extends Function> (String symbolName, {bool isLeaf = false}) → F -
Available on DynamicLibrary, provided by the DynamicLibraryExtension extension
Looks up a native function and returns it as a Dart function. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
providesSymbol(
String symbolName) → bool - Checks whether this dynamic library provides a symbol with the given name.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Dynamic libraries are equal if they load the same library.
override