Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp8 vs vfp9
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01130175
Message ID:
01130225
Views:
10
This message has been marked as the solution to the initial question of the thread.
I would suggest using WaitForSingleObject API call instead of calling GetExitCodeProcess within DO WHILE cycle. This way it works -- have just tested -- in both VFP8 and VFP9.
#DEFINE INFINITE  0xFFFFFFFF
= WaitForSingleObject(hProcess, INFINITE)
Insert this line immediately after obtaining process and thread handles replacing the DO WHILE part.

Also you may consider using Windows Scripting objects.
#DEFINE EXEC_NOWAIT 0
#DEFINE EXEC_AND_WAIT 1
oShell = CreateObject('WScript.Shell')
oShell.Run("notepad c:\temp\myfile.txt", 1, EXEC_AND_WAIT)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform