Table of Contents

Method Load

Namespace
Ubiquity.NET.InteropHelpers
Assembly
Ubiquity.NET.InteropHelpers.dll

Load(string, Assembly, DllImportSearchPath?)

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

public static NativeLibraryHandle Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)

Parameters

libraryName string

The name of the native library to be loaded.

assembly Assembly

The assembly loading the native library.

searchPath DllImportSearchPath?

The search path.

Returns

NativeLibraryHandle

The OS handle for the loaded library.

Exceptions

ArgumentNullException

libraryName or assembly is null.

ArgumentException

assembly is not a RuntimeAssembly.

DllNotFoundException

The library can't be found.

BadImageFormatException

The library is not valid.