INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

API Functions

VFP Memory Management - SetProcessWorkingSetSize by dagair
Posted: 14 Nov 12

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.

proc CutWinMem
Declare Integer SetProcessWorkingSetSize In kernel32 As SetProcessWorkingSetSize ;
Integer hProcess , Integer dwMinimumWorkingSetSize , ;
Integer dwMaximumWorkingSetSize
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...


Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close