Im trying to write a function that when called will perform the same actions as Microsoft's CacheSet tool to flush the system cache.
Here is my non-working attempt:
P.S. - I dont know how much help it will be but just in case, HERE is a topic I started on the AHK forums that never amounted to much ...
P.P.S - It was recommended to me to also post the CacheSet source ... Here ... Line 257 is the start of the function Im interested in.
Here is my non-working attempt:
Code
p := ClearCache()
If not p
MsgBox, Success
If p
MsgBox, Fail`n%p%
ClearCache()
{
k := DllCall("ntdll.dll\NtSetSystemInformation", "Str", SYSTEM_CACHE_INFORMATION, "UInt", -1, "UInt", -1)
If not k
k := DllCall("Kernel32.dll\GetLastError")
Return k
}P.S. - I dont know how much help it will be but just in case, HERE is a topic I started on the AHK forums that never amounted to much ...
P.P.S - It was recommended to me to also post the CacheSet source ... Here ... Line 257 is the start of the function Im interested in.

