Lue englanniksi Muokkaa

Jaa


NativeLibrary Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Provides APIs for managing native libraries.

C#
public static class NativeLibrary
Inheritance
NativeLibrary

Methods

Free(IntPtr)

Frees a loaded library with the specified OS handle, or takes no action if the input handle is Zero.

GetExport(IntPtr, String)

Gets the address of an exported symbol.

GetMainProgramHandle()

Get a handle that can be used with GetExport(IntPtr, String) or TryGetExport(IntPtr, String, IntPtr) to resolve exports from the entry point module.

Load(String, Assembly, Nullable<DllImportSearchPath>)

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

Load(String)

Provides a simple API for loading a native library that wraps the OS loader and uses default flags.

SetDllImportResolver(Assembly, DllImportResolver)

Sets a callback for resolving native library imports from an assembly.

TryGetExport(IntPtr, String, IntPtr)

Gets the address of an exported symbol and returns a value that indicates whether the method call succeeded.

TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr)

Provides a high-level API that loads a native library and returns a value that indicates whether the operation succeeded.

TryLoad(String, IntPtr)

Provides a simple API for loading a native library and returns a value that indicates whether the operation succeeded.

Applies to

Tuote Versiot
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10