NativeLibrary.TryGetExport(IntPtr, String, IntPtr) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得匯出的符號位址,並傳回指出方法呼叫是否成功的值。
public:
static bool TryGetExport(IntPtr handle, System::String ^ name, [Runtime::InteropServices::Out] IntPtr % address);
public static bool TryGetExport (IntPtr handle, string name, out IntPtr address);
static member TryGetExport : nativeint * string * nativeint -> bool
Public Shared Function TryGetExport (handle As IntPtr, name As String, ByRef address As IntPtr) As Boolean
參數
- handle
-
IntPtr
nativeint
原生程式庫作業系統控點。
- name
- String
匯出符號的名稱。
- address
-
IntPtr
nativeint
方法傳回時,包含符號位址 (如有)。
傳回
true
如果成功找到匯出符號的位址,則為 ;否則為 false
。
例外狀況
handle
是 Zero,或 name
是 null
。
備註
這是操作系統呼叫的簡單包裝函式,不會執行任何名稱管理。
不支援使用 以外的IntPtr.Zero無效handle
參數呼叫這個方法,並會導致未定義的行為。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應