可以可以Set多一点?给多RAM的人用
請問為什麽這個不行呢?
- Public Class Form1
- Declare Function FindWindow Lib "user32.dll" Alias "FindWindowW" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
- Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal dwMinimumWorkingSetSize As Int32, ByVal dwMaximumWorkingSetSize As Int32) As Int32
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- Try
- GC.Collect()
- GC.WaitForPendingFinalizers()
- If Environment.OSVersion.Platform = PlatformID.Win32NT Then
- SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1)
- End If
- Catch
- End Try
- End Sub
- End Class
我知道了!要拿processid
[ 本帖最后由 goodhermit95 于 2009-5-21 11:58 AM 编辑 ]






