NativeLibrary NativeLibrary NativeLibrary NativeLibrary Class

Definition

Provides APIs for managing native libraries.

public ref class NativeLibrary abstract sealed
public static class NativeLibrary
type NativeLibrary = class
Public Class NativeLibrary
Inheritance
NativeLibraryNativeLibraryNativeLibraryNativeLibrary

Methods

Free(IntPtr) Free(IntPtr) Free(IntPtr) Free(IntPtr)

Frees a given a loaded library handle, or takes no action if the input handle is Zero.

GetExport(IntPtr, String) GetExport(IntPtr, String) GetExport(IntPtr, String) GetExport(IntPtr, String)

Gets the address of an exported symbol.

Load(String) Load(String) Load(String) Load(String)

Provides a simple API for loading a native library that wraps the OS loader and uses default flags.

Load(String, Assembly, Nullable<DllImportSearchPath>) Load(String, Assembly, Nullable<DllImportSearchPath>) Load(String, Assembly, Nullable<DllImportSearchPath>) Load(String, Assembly, Nullable<DllImportSearchPath>)

Provides a high-level API for loading a native library.

SetDllImportResolver(Assembly, DllImportResolver) SetDllImportResolver(Assembly, DllImportResolver) SetDllImportResolver(Assembly, DllImportResolver) SetDllImportResolver(Assembly, DllImportResolver)

Sets a callback for resolving native library imports from an assembly.

TryGetExport(IntPtr, String, IntPtr) TryGetExport(IntPtr, String, IntPtr) TryGetExport(IntPtr, String, IntPtr) TryGetExport(IntPtr, String, IntPtr)

Gets the address of an exported symbol and returns a value that indicates whether the method call succeeded.

TryLoad(String, IntPtr) TryLoad(String, IntPtr) TryLoad(String, IntPtr) TryLoad(String, IntPtr)

Provides a simple API for loading a native library and returns a value that indicates whether the operation succeeded.

TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr) TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr) TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr) TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr)

Provides a high-level API that loads a native library and returns a value that indicates whether the operation succeeded.

Applies to