Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUN and a memory-hungry program

Status
Not open for further replies.

Kimed

Programmer
May 25, 2005
104
LT
I have to launch an external program from Foxpro, but it alone takes about 500K of memory and that's too big to fit no matter how much memory I assign in the RUN /n parameter and/or Fox's shortcut. Is it possible to launch a program as a separate Windows process, so that it wouldn't take the conventional memory Fox assigns? (I've tried to put the program into a .bat file, but it still returns "not enough memory" error. I also tried to make a .pif for it, but Fox doesn't see it at all).

Thanks.
 
PS: Tried to launch it through START as well. Result - "Bad command or file name", despite all data and programs are in the current folder.
 
Kimed,
sys(12), sys(1001) before RUN ?
For max memory you may try
RUN /0K cmd /c MyProgram
Have you right FOXSWAP ?
Tesar
 
Run /0K I've tried; according to online help, FOXSWAP is invoked automatically if the size specified is too big (or 0).
Run cmd /c helped... partially. Sometimes it works as intended, sometimes it breaks the whole app with "Phar Lap fatal err 10049: Ran out of stack buffers" error message. Since the app is going to be used by other operators than myself, it's not an acceptable "side effect".

Thanks for help.
 
I run MS Works from inside Foxpro DOS on WIN98 using a .wps file on a network drive as follows:
!c:\progra~1\msworks\msworks l:\quotes\&qworks..wps
and have never had any memory issues. Works starts itself up as a completely separate job in a new window. This seems to work with all the windows progs I have tried.
I think the trick is to make sure you are starting a pukka windows .exe program and get all the paths correct.
 
Is there a way you can QUIT Foxpro and restart it again with some assistance from a BAT file? Say during the program we create a FOX1.BAT with the command to be run then QUIT Foxpro. If FOX were being run from a BAT file like this one we would run with all available memory then we'd start Fox again.

REM FOX.BAT
:AGAIN
DEL FOX1.BAT
FOX.EXE MYPROG.PRG
IF EXIST FOX1.BAT GOTO :FOX1
GOTO :END
:FOX1
CALL FOX1.BAT
GOTO :AGAIN
:END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top