RuntimeServices.LoadLibrary Method

Loads a native library of the specified name, optionally using the suggested location.

Definition

Namespace: Numerics.NET.Providers.InteropServices
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static void LoadLibrary(
	string filename,
	string? libraryPath
)

Parameters

filename  String
The filename of the library to load.
libraryPath  String
(Optional.) The path where the library is located.

Remarks

This method looks for the library in the following order:

  1. The platform folder under the path specified by libraryPath, if it was supplied.
  2. The path specified by libraryPath, if it was supplied.
  3. The platform folder under the path specified by NativeProviderPath, if it is not null or empty.
  4. The path specified by NativeProviderPath, if it is not null or empty.
  5. The platform folder under the path specified by the
    C#
    XO_LIBRARY_PATH
    environment variable, if it exists.
  6. The path specified by the
    C#
    XO_LIBRARY_PATH
    environment variable, if it exists.
  7. The platform folder under the base folder of the app domain.
  8. The base folder of the app domain.
  9. The platform folder under the folder that contains the executing assembly.
  10. The folder that contains the executing assembly.

See Also