- 分享
- 0
- 人气
- 0
- 主题
- 62
- 帖子
- 6367
- UID
- 51295
- 积分
- 3715
- 阅读权限
- 21
- 注册时间
- 2006-11-21
- 最后登录
- 2022-1-19
- 在线时间
- 3699 小时
|
多谢多谢,我开发一个多功能的
可以可以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 编辑 ] |
|