Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make ShellExecute wait for process to complete
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00966017
Message ID:
00966255
Vues:
25
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all
>
>I have this ShellExecute declaration and execution working well. But it seems that ShellExecute does not wait for the process to complete and then proceed with VFP code execution.
>
>Is there any way or another equivalant win-api that waits for the process to complete before it returns control to VFP?
>
>Please advise.

I know you have the answer to your question, but there is another way to do this that, IMO, is simpler. Ed and I wrote about this in the October 2000 issue of the VFUG newsletter, that's available on-line at www.vfug.org.
oShell = CREATEOBJECT('WScript.Shell')
oShell.Run('myexe.exe', 5, .T.)
The "myexe.exe" should be replaced by the fully qualified path of the executable. 5 = SW_SHOWNORMAL and the .T. parameter indicates that the calling application should wait until the called application terminates.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform