StdcDlfcn extension

Extension providing <dlfcn.h> functionality.

on

Properties

RTLD_GLOBAL int

Available on Stdc, provided by the StdcDlfcn extension

All symbols are available for relocation processing of other modules.
no setter
RTLD_LAZY int

Available on Stdc, provided by the StdcDlfcn extension

Relocations are performed at an implementation-defined time.
no setter
RTLD_LOCAL int

Available on Stdc, provided by the StdcDlfcn extension

All symbols are not made available for relocation processing by other modules.
no setter
RTLD_NOW int

Available on Stdc, provided by the StdcDlfcn extension

Relocations are performed when the object is loaded.
no setter

Methods

dlclose(DynamicLibrary handle) int

Available on Stdc, provided by the StdcDlfcn extension

Decrements the reference count on the dynamic library handle. Note: dart:ffi does not currently provide a way to explicitly close a DynamicLibrary. This function acts as a no-op but returns 0 for success.
dlerror() String?

Available on Stdc, provided by the StdcDlfcn extension

Returns a human-readable string describing the most recent error that occurred from dlopen(), dlsym() or dlclose() since the last call to dlerror().
dlopen(String? filename, int flag) DynamicLibrary?

Available on Stdc, provided by the StdcDlfcn extension

Loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle" for the dynamic library.
dlsym<T extends NativeType>(DynamicLibrary handle, String symbol) Pointer<T>?

Available on Stdc, provided by the StdcDlfcn extension

Takes a "handle" of a dynamic library returned by dlopen() and the null-terminated symbol name, returning the address where that symbol is loaded into memory.