dart:ffi
DynamicLibrary class
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()
factory
- Creates a DynamicLibrary containing all the symbols of the running executable.
- DynamicLibrary.open(String path)
factory
- Loads a library file and provides access to its symbols.
- DynamicLibrary.process()
factory
- Creates a DynamicLibrary holding all global symbols.
Properties
- handle → Pointer<Void>
read-only
- The opaque handle to the dynamic library.
- hashCode → int
read-only, override
- The hash code for a DynamicLibrary only depends on the loaded library.
- runtimeType → Type
read-only, inherited
- A representation of the runtime type of the object.
Methods
- lookup<T extends NativeType>(String symbolName) → Pointer<T>
- Looks up a symbol in the DynamicLibrary and returns its address in memory.
- noSuchMethod(Invocation invocation) → dynamic
inherited
- Invoked when a non-existent method or property is accessed.
- providesSymbol(String symbolName) → bool
@Since('2.14')
- Checks whether this dynamic library provides a symbol with the given name.
- toString() → String
inherited
- A string representation of this object.
Operators
- operator ==(Object other) → bool
override
- Dynamic libraries are equal if they load the same library.