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)

如果輸入控點是 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,以載入包裝作業系統載入器並使用預設旗標的原生程式庫。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.

適用於