Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to wait for completion of shellexec ?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00739175
Message ID:
00744199
Views:
11
It is possible to use a combination of API calls: CreateProcess, WaitForSingleObject, and CloseHandle.

When a process, say Excel.exe is created and running, then the WaitForSingleObject is called with the process handle and INFINITE flag.

FoxPro is effectively locked until the Excel session is closed. After that just call CloseHandle function.

* * *
And by the way, did you try VBScript object?
cmdReturn = sll.Run(lcCmd, 1, .T.)
Previous
Reply
Map
View

Click here to load this message in the networking platform