Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute with Wait
Message
From
04/10/2005 17:06:31
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
ShellExecute with Wait
Miscellaneous
Thread ID:
01056067
Message ID:
01056067
Views:
88
Hi!

How can I get the windows ShellExecute() API to force a wait so that it waits till the ShellExecute() function finishes and only then processes the next record.?

Is there a parameter I can pass to ShellExecute to make it Run and Wait?
e.g.
DECLARE INTEGER ShellExecute IN shell32.dll ; 
  INTEGER lhndWin, ;
  STRING lcAction, ;
  STRING lcFileName, ;
  STRING lcParams, ;
  STRING lcDir, ;
  INTEGER lnShowWin

lcAction = "open"

Select (MyAlias)
Scan
   lcFileName = MyAlias.FileName && "c:\MyBatchFile.bat"
   If ShellExecute(0, cAction, cFileName, "", "", 2) > 32 then
      *-- Success
   Else
      *-- Error
   Endif
   *-- Want to wait till the above ShellExecute() function
   *-- finishes and only then process the next record.
Endscan
Thanks.

Sarosh
Next
Reply
Map
View

Click here to load this message in the networking platform