When Sys(1104) and Sys(3050) have had no effect on memory and VFP application stability and error prevention, I have found SetProcessWorkingSetSize to be very useful.
Declare Integer SetProcessWorkingSetSize In kernel32 As SetProcessWorkingSetSize ;
Integer hProcess , Integer dwMinimumWorkingSetSize , ;
Declare Integer GetCurrentProcess In kernel32 As GetCurrentProcess
nProc = GetCurrentProcess()
* param2 = minimum set size, param3 = max set size --> -1 is to reclaim as much page memory as possible
bb = SetProcessWorkingSetSize(nProc,-1,-1)
I had difficulties with report output causing 'insufficient memory' errors and this solved the problem. Additionally, over terminal services I was having a problem with macro expansion not being enterpreted correctly and consistently and this seemed to resolve the problem...