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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Problem with RUN command

Status
Not open for further replies.

JNC73

Technical User
Jan 8, 2001
65
NL
Hi,

Can anyone help me to solve this problem?

I want to run a dos executable from my FoxPro5 application with the RUN command.
But when I run it I can read in the dos box that there isn't enough workmemmory to run the program.
Can anyone tell me how to solve this?

Thnx,

JNC73
 
JNC73,
From the Help File for VFP 5.0 SP3 - topic: RUN / !:
Memory Considerations By default, FOXRUN.PIF allocates a minimum of 256K of memory for running an external command or program. If you do not have 256K of free conventional memory, Visual FoxPro displays an error message. To correct this, try one or both of the following:

· Close applications and files to free up additional memory.
· Edit FOXRUN.PIF to reduce the amount of memory required in the KB Required text box.

If the external command requires more than 256K, MS-DOS displays an error message in the FoxPro Run Command window. To correct this, edit your FOXRUN.PIF to increase the amount of memory required in the KB Required text box.

Rick
 
I already tried it.
But when I view the properties of the FoxRun.PIF file there is no text box with the label Memory Required.

I use Win2K maybe this will help.
 
When I choose FoxRun.PIF in the Explorer, and right-click and select Properties, there is a whole tab on Memory - Conventional, Expanded, Extended. In the conventional area, you have both the actual memory AND in Environment memory, and while mine are both set to Auto, try changing them to max values as long as you have available memory on this system.

Rick


 
I also tried that, but it didn't work.
So I think the solution must be somewhere else.

 
Rather than using the RUN statement, why don't you use ShellExecute() or another API call to fire up the DOS app, and bypass this problem? (Do a search here for ShellExecute for some ideas.)

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top