modProcessTool 函式庫 風禹科技驗證有限公司 網站 提供 .Net 原始碼

FreeLibrary 函數

說明

[API] 釋放指定程式庫

本函數之引數列表

引數 型態 位元組 選項 預設值 說明
hModule IntPtr 4 必須 (無) 模組代號 (hModule),基底記憶體位置

傳回值

傳回 Integer ,成功為非 0 值

範例

' 因應 AmosConnector 的 MAPI 無法正確釋放,改為手動強制釋放 

Dim currentProcess As Process = Process.GetCurrentProcess() 

With currentProcess 

     For ibp As Integer = 0 To .Modules.Count - 1 

          With .Modules(ibp) 

               If LCase(.ModuleName) = "mapi32.dll" Then 

                    FreeLibrary(.BaseAddress) 

               End If 

          End With 

     Next 

End With

基本條件

Visual Studio .Net 2002 以後相容版本 | Process.vb

請參閱

modProcessTool 函式庫