[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
|
|