NativeLibrary Class
Namespace: Stride.CoreAssembly: Stride.Core.dll
public static class NativeLibrary
| Name | Description | |
|---|---|---|
| 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. |
|
| UnLoad(String) | UnLoad a specific native dynamic library loaded previously by Stride.Core.NativeLibrary.LoadLibrary(System.String). |
|
| UnLoadAll() | UnLoad all native dynamic library loaded previously by Stride.Core.NativeLibrary.LoadLibrary(System.String). |
|
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
| Type | Name | Description |
|---|---|---|
| System.String | libraryName | Name of the library. |
| System.Type | owner | Type whose assembly location is related to the native library (we can't use GetCallingAssembly as it might be wrong due to optimizations). |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Library could not be loaded. |
UnLoad(String)
UnLoad a specific native dynamic library loaded previously by Stride.Core.NativeLibrary.LoadLibrary(System.String).
public static void UnLoad(string libraryName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | libraryName | Name of the library to unload. |
UnLoadAll()
UnLoad all native dynamic library loaded previously by Stride.Core.NativeLibrary.LoadLibrary(System.String).
public static void UnLoadAll()