Table of Contents

Method GetSymbolDelegate

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

GetSymbolDelegate<T>(nint, string)

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

public static T GetSymbolDelegate<T>(nint library, string name) where T : Delegate

Parameters

library nint

The handle to the native library.

name string

The exported symbol name to resolve.

Returns

T

An instance of T that can be invoked to call the native function.

Type Parameters

T

The delegate type that matches the native function signature.

Exceptions

EntryPointNotFoundException

Thrown when the specified symbol cannot be found in the library.