Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    NativeLibrary Class

    Namespace: Stride.Core
    Assembly: Stride.Core.dll
    System.Object → NativeLibrary
    Derived from NativeLibrary:

    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).

    | Improve this Doc View Source

    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()

    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation