如何用VB划出指定大小的内存空间供使用呢?
发布网友
发布时间:2022-09-10 11:55
我来回答
共1个回答
热心网友
时间:2023-12-18 23:12
用SetProcessWorkingSetSize函数,实例如下:
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 Timer1_Timer()
SetProcessWorkingSetSize GetCurrentProcess(), 50000, 100000
End Sub