foxmail邮箱网页登录:用VB耗光内存的原码

来源:百度文库 编辑:高考问答 时间:2024/05/12 16:39:10
原码...OK?
我需要能让内存变的不够用的原码

hook没想出来怎么做,呵呵!

以下是这个降低内存占用的例子,你研究一下

Private Declare Function SetProcessWorkingSetSize Lib "kernel32" (ByVal hProcess As Long, ByVal dwMinimumWorkingSetSize As Long, ByVal dwMaximumWorkingSetSize As Long) As Long

Private Declare Function GetCurrentProcess Lib "kernel32" () As Long

Private Sub Command1_Click()
SetProcessWorkingSetSize GetCurrentProcess(), -1&, -1&
End Sub

用Hook做