Table of Contents

Class LibraryLoader

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Provides helper methods to locate, load, resolve symbols and unload native libraries across supported platforms.

public static class LibraryLoader
Inheritance
LibraryLoader

Properties

Extension

Gets the platform-specific native library file extension (for example, ".dll", ".so", or ".dylib").

Methods

CheckLibraryPath(string, string, string, out string)

Checks whether the specified library file exists in the given root path, trying platform-specific and architecture folders first.

FreeLibrary(nint)

Releases the specified dynamically loaded library, freeing associated resources.

GetLibraryPath<T>(string)

Determines the best path to the specified native library by probing common locations relative to the managed assembly, the current directory, and application domain paths. If no local file is found, returns the library name with platform extension.

GetSymbol(nint, string)

Resolves the address of an exported symbol from a native library handle.

GetSymbolDelegate<T>(nint, string)

Retrieves a delegate of the specified type for the given symbol exported by a native library.

LoadLibrary(string)

Loads the specified native library using the platform-specific loader.

LoadLocalLibrary<T>(string)

Loads a native library by probing common locations and returns a handle to the loaded library.

TryGetSymbolDelegate<T>(nint, string)

Attempts to retrieve a delegate of the specified type for a symbol in a native library.

TryLoadLocalLibrary<T>(string)

Attempts to load a local library and returns a handle to the loaded library.