Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PROCESS.VCX
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
PROCESS.VCX
Divers
Thread ID:
00295080
Message ID:
00295080
Vues:
51
Ed,
I saw your solution to the problem of running dos programs in
VFP6 and making sure that the dos program is finished before
VFP continues on the Universal Thread. I downloaded the
PROCESS.vcx class and included it in my project. Let me first
state that I am new to working with VFP and classes. My app
has to run batch programs that FTP files from one sever to
another. Here is the code that I am using with your class:

Set classlib to process additive
oapprun=createobj('api_apprun','c:\dataflow\barbatch.bat','c:\dataflow',"min")
oapprun.launchappandwait()
do while .t.
if oapprun.CheckProcessExitCode()=259
loop
else
exit
endif
enddo
release oapprun

I saw in a message that I can poll the CheckProcessExitCode
for a value other than 259 to make sure it has ended before
proceeding with the rest of the program. This code is inside
of a timer that is set to false by the time it gets to this
code. My problem is that I have to insert a wait window with
a timeout of 5 seconds after this code. If I take the wait window
out, the timer code is started all over again for some reason.
Do you see anything wrong with this sample code or is there
a better way to check for the termination of the program?

I really appreciate any direction that you may lend me!!

Joe Glen
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform