找回密码
 加入
搜索
查看: 1902|回复: 0

[AU3基础] 内存函数如何应用

[复制链接]
发表于 2010-7-5 15:55:04 | 显示全部楼层 |阅读模式
_ReduceMemory(@AutoItPID)
Func _ReduceMemory($i_PID = -1)
         If $i_PID <> -1 Then
                 Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
                 Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
                 DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
         Else
                 Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
         EndIf

         Return $ai_Return[0]
EndFunc   ;==>_ReduceMemory
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-17 20:06 , Processed in 0.077225 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表