Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running DOS programs
Message
 
À
01/04/2004 13:27:20
Allen Hanna
H. A. Hanna Associates
Indianola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00891445
Message ID:
00891579
Vues:
15
Probably you are calling bat file with the RUN command from VFP.
If it is the case, then I would try to call the exe file directly from shellexec, like:
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow

? ShellExecute(0,"open","dosexe.exe","list of parameters","",0)
clear dlls

>It is an EXE, however, it is called from a DOS batch file with parameters. I was sure it was a mem allocation problem. I solved it (apparently) by taking a copy of foxrun.pif,putting it in the working directory of the DOS program I want to run, and changing the "cmd line" to a batch file with the parameters required. I set conventional memory to Auto, initial environment to 512, XMS memory to 1024 and clicked "Uses HMA". In VFP is simply run the pif file.
>
>I don't know how many of these changes were necessary but it works and I'm happy. I can't really experiment with it because it's on a client's remote computer. Otherwise, I'd play around with it to see what settings were really needed.
>
>Thanks for your response. Did you have some suggestions in mind? I just don't know too much about this general area.
>
>>What is the "DOS program"? Is it executable file? How do you call it from VFP?
>>
>>
>>>I have a VFP 6 app that needs to run a dos command. It fails and I think it's because there is not enough conventional memory available. So, I created a PIF file that names the command to run. For memory I set it to 640 (dropdown selection on the memory page). But, when I edit properties I see that it reverts to Auto. There are several memory selections: Conventional, Initial, EMS, XMS, DPMI, protected mode, etc. Not sure what to set here. VFP help refers to KB Required text box in PIF files but I don't see it, just the dropdowns. I'm running Win 2k Pro.
>>>
>>>Any tips out there for maximizing memory available for DOS programs?
>>>
>>>Thanks a bunch,
>>>Allen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform