NativeLibrary 类

定义

提供用于管理本机库的 API。Provides APIs for managing native libraries.

public ref class NativeLibrary abstract sealed
public static class NativeLibrary
type NativeLibrary = class
Public Class NativeLibrary
继承
NativeLibrary

方法

Free(IntPtr)

使用给定的 OS 句柄释放已加载的库,或在输入句柄为 Zero 时不执行任何操作。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.

Load(String)

提供一个简单 API,用于加载包装 OS 加载程序并使用模式标志的本机库。Provides a simple API for loading a native library that wraps the OS loader and uses default flags.

Load(String, Assembly, Nullable<DllImportSearchPath>)

提供用于加载本机库的高级 API。Provides a high-level API for loading a native library.

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)

提供一个高级 API,用于加载本机库并返回一个指示操作是否成功的值。Provides a high-level API that loads a native library and returns a value that indicates whether the operation succeeded.

TryLoad(String, IntPtr)

提供一个简单 API,用于加载本机库并返回一个指示操作是否成功的值。Provides a simple API for loading a native library and returns a value that indicates whether the operation succeeded.

适用于