Skip to content

Commit bcb9ca1

Browse files
authored
Update - Version 1.1
SetCursor bugfix
1 parent 5a5527d commit bcb9ca1

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

MemListMgr.twinproj

334 Bytes
Binary file not shown.

Settings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
"project.startupObject": "Sub Main",
6060
"project.targetOsVersion": 327681,
6161
"project.versionAutoIncrement": "Build",
62-
"project.versionBuild": 23,
62+
"project.versionBuild": 25,
6363
"project.versionCompanyName": "JAJ Productions",
6464
"project.versionFileDescription": "Memory List Manager",
6565
"project.versionLegalCopyright": "(c) 2024",
6666
"project.versionMajor": 1,
67-
"project.versionMinor": 0,
67+
"project.versionMinor": 1,
6868
"project.versionProductName": "MemoryListManager",
6969
"project.versionRevision": 0,
7070
"project.warnings": {

frmMain.twin

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
Class frmMain
55
' ***********************************************************************
66
' * *
7-
' * Memory List Manager Version 1.0 *
7+
' * Memory List Manager Version 1.1 *
88
' * GUI Form *
99
' * *
1010
' * See modMemListMgr.twin for full details. *
1111
' * *
1212
' ***********************************************************************
1313

1414

15-
1615
Private Const sSizeFmt_byte = "0 bytes"
1716
Private Const sSizeFmt_kb = "#,##0 KB"
1817
Private Const sSizeFmt_mb = "#,##0.00 MB"

modMemListMgr.twin

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
/* ********************************************************************
33
* *
4-
* Memory List Manager Version 1.0 *
4+
* Memory List Manager Version 1.1 *
55
* (Main module) *
66
* A simple tool to free standby memory and flush caches. *
77
* *
88
* Requirements: *
9-
* -Windows XP or newer (note: Some functions require Windows 8 or *
10-
* or Windows 8.1). *
9+
* -Windows XP or newer (note: Some functions require Windows 7, *
10+
* or Windows 8/Windows 8.1). *
1111
* -This program generally must be run as admin for all commands. *
1212
* Specifically, most operations require the *
1313
* SeProfileSingleProcessPrivilege and emptying the file cache *
@@ -34,6 +34,7 @@
3434
* Project home page: https://github.com/fafalone/MemListMgr *
3535
* *
3636
* Changelog *
37+
* Version 1.1 (13 Jun 2024) - SetCursor calls fixed. *
3738
* Version 1.0 (13 Jun 2024) - Initial release. *
3839
* *
3940
***********************************************************************
@@ -152,44 +153,44 @@ Module modMemListMgr
152153
nCmd = MemoryPurgeStandbyList
153154
End If
154155
Dim status As NTSTATUS
155-
SetCursor IDC_WAIT
156+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
156157
status = NtSetSystemInformation(SystemMemoryListInformation, nCmd, LenB(nCmd))
157-
SetCursor IDC_ARROW
158+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
158159
Return status
159160
End Function
160161

161162
Public Function FlushModified() As NTSTATUS
162163
Dim nCmd As SYSTEM_MEMORY_LIST_COMMAND = MemoryFlushModifiedList
163164
Dim status As NTSTATUS
164-
SetCursor IDC_WAIT
165+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
165166
status = NtSetSystemInformation(SystemMemoryListInformation, nCmd, LenB(nCmd))
166-
SetCursor IDC_ARROW
167+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
167168
Return status
168169
End Function
169170

170171
Public Function EmptyWorkingSets() As NTSTATUS
171172
Dim nCmd As SYSTEM_MEMORY_LIST_COMMAND = MemoryEmptyWorkingSets
172173
Dim status As NTSTATUS
173-
SetCursor IDC_WAIT
174+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
174175
status = NtSetSystemInformation(SystemMemoryListInformation, nCmd, LenB(nCmd))
175-
SetCursor IDC_ARROW
176+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
176177
Return status
177178
End Function
178179

179180
Public Function CombinePages(Optional pNumCombined As LongLong) As NTSTATUS
180181
Dim mci As MEMORY_COMBINE_INFORMATION_EX
181182
Dim status As NTSTATUS
182-
SetCursor IDC_WAIT
183+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
183184
status = NtSetSystemInformation(SystemCombinePhysicalMemoryInformation, mci, LenB(Of MEMORY_COMBINE_INFORMATION_EX))
184185
pNumCombined = mci.PagesCombined
185-
SetCursor IDC_ARROW
186+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
186187
Return status
187188
End Function
188189

189190
Public Function FlushRegistryCache() As NTSTATUS
190-
SetCursor IDC_WAIT
191+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
191192
FlushRegistryCache = NtSetSystemInformation(SystemRegistryReconciliationInformation, ByVal 0&, 0&)
192-
SetCursor IDC_ARROW
193+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
193194
End Function
194195

195196
Public Function FlushFileCache(Optional pSize As LongLong) As NTSTATUS
@@ -198,7 +199,7 @@ Module modMemListMgr
198199
Dim status As NTSTATUS
199200
Dim bRet As Byte
200201
Dim cb As Long
201-
SetCursor IDC_WAIT
202+
SetCursor LoadCursor(0, ByVal IDC_WAIT)
202203
status = RtlAdjustPrivilege(SE_INCREASE_QUOTA_PRIVILEGE, 1, 0, bRet)
203204
status = NtQuerySystemInformation(SystemFileCacheInformationEx, sfi, LenB(Of SYSTEM_FILECACHE_INFORMATION), cb)
204205
If NT_SUCCESS(status) Then
@@ -207,7 +208,7 @@ Module modMemListMgr
207208
status = NtSetSystemInformation(SystemFileCacheInformationEx, sfiSet, LenB(Of SYSTEM_FILECACHE_INFORMATION))
208209
pSize = sfi.CurrentSize
209210
End If
210-
SetCursor IDC_ARROW
211+
SetCursor LoadCursor(0, ByVal IDC_ARROW)
211212
Return status
212213
End Function
213214

0 commit comments

Comments
 (0)