而使用1.1.07.03编译就正常显示数值。
Code: Select all
;显示系统缓存工作集当前值Start=========================================
; Constant
SYSTEM_INFO_CLASS = 0x15
; Set buffer size
SystemInfoLength = 36
VarSetCapacity(SystemCacheInfo, SystemInfoLength, 0)
; DLL call
DllCall("C:\Windows\system32\ntdll.dll\NtQuerySystemInformation", "UInt",SYSTEM_INFO_CLASS, "UInt",&SystemCacheInfo, "UInt",SystemInfoLength)
; Read values
CurrentSize := NumGet(SystemCacheInfo, 0, "UInt")
PeakSize := NumGet(SystemCacheInfo, 4, "UInt")
PageFaultCount := NumGet(SystemCacheInfo, 8, "UInt")
MinimumWorkingSet := NumGet(SystemCacheInfo, 12, "UInt")
MaximumWorkingSet := NumGet(SystemCacheInfo, 16, "UInt")
TransitionSharedPages := NumGet(SystemCacheInfo, 20, "UInt")
PeakTransitionSharedPages := NumGet(SystemCacheInfo, 24, "UInt")
; Tweak values to make correct
CurrentSize /= 1024
PeakSize /= 1024
MinimumWorkingSet *= 4
MaximumWorkingSet *= 4
TransitionSharedPages *= 4
PeakTransitionSharedPages *= 4
;统计系统缓存工作集当前值End==============================================
start:
;gui,Destroy
;gui,new
vMyLV=0
Loop
{
;MsgBox,,,vMyLV=%vMyLV%
if vMyLV=0
Gui, Add, ListView, x0 y0 r45 w400 h550 vMyLV, Attribute|Value
GuiControl, -Redraw, MyLV
;While colItems[objItem]
;{
;/*
;aaa:=objItem.Name
;if aaa=_Total
;{
LV_Add("","CacheBytes: " ,CurrentSize)
LV_Add("","CacheBytesPeak: " ,PeakSize)
LV_Add("","MinimumWorkingSet: " ,MinimumWorkingSet)
LV_Add("","PageFaultCount : " ,PageFaultCount )
LV_Add("","MaximumWorkingSet: " ,MaximumWorkingSet)
LV_Add("","TransitionSharedPages: " ,TransitionSharedPages)
LV_Add("","PeakTransitionSharedPages: " ,PeakTransitionSharedPages)
;bbb:=objItem.AvgDiskQueueLength
;LV_Add("","aaa: " ,aaa)
;LV_Add("","bbb: " ,bbb)
;}
;}
GuiControl, +Redraw, MyLV
LV_ModifyCol()
vMyLV=1
Gui, Show, y150 w400 h550, Operating System 内存相关信息 ;Operating System Details
Sleep 2000
LV_Delete()
Gui, Show ;, y150 w400 h550, Operating System Details
;Sleep 100
}
;Return
GuiClose:
;Return
ExitApp
;goto start
*/