PROCEDURE CheckAdjustMemory >LPARAMETERS PctMax >LOCAL cBuffer >DECLARE GlobalMemoryStatus IN Kernel32 STRING @ lpBuffer >cBuffer = REPLICATE(CHR(0),32) >=GlobalMemoryStatus(@cBuffer) >* Percent of memory usage; 1st byte of 2nd DWord >IF ASC(SUBSTR(cbuffer,5)) > PctMax > CLEAR RESOURCES >ENDIF >RETURNMark, thanks for sharing that! I've got a windows service which processes images and prints them to PDF reports, it does use alot of system resources and this should be a great help.
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature