Table of Contents

Class NativeLibraryHelper

Namespace
Stride.Core
Assembly
Stride.Core.dll
public static class NativeLibraryHelper
Inheritance
NativeLibraryHelper

Methods

PreloadLibrary(string, Type)

Try to preload the library. This is useful when we want to have AnyCPU .NET and CPU-specific native code. Only available on Windows for now.

public static void PreloadLibrary(string libraryName, Type owner)

Parameters

libraryName string

Name of the library, without the extension.

owner Type

Type whose assembly location is related to the native library (we can't use GetCallingAssembly as it might be wrong due to optimizations).

Exceptions

InvalidOperationException

Library could not be loaded.

RegisterDependency(string)

Registers a native dependency.

public static void RegisterDependency(string libraryPath)

Parameters

libraryPath string

The full path to the native library.

Exceptions

ArgumentNullException

UnLoad(string)

UnLoad a specific native dynamic library loaded previously by LoadLibrary.

public static void UnLoad(string libraryName)

Parameters

libraryName string

Name of the library to unload.

UnLoadAll()

UnLoad all native dynamic library loaded previously by LoadLibrary.

public static void UnLoadAll()