Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute error
Message
 
 
To
13/11/2007 09:45:39
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01268567
Message ID:
01268836
Views:
15
>Yes, the user can double click on the file and it launches fine. Also they can run it with windows run.

There's no reason to pass parameters by reference to ShellExecute. when you do, you've to add CHR(0) to the end of each string. VFP takes care of that when you pass parameters by value. Also try to use default action instead of 'open'.
DECLARE INTEGER ShellExecute IN shell32; 
    INTEGER hwnd, STRING  lpOperation,STRING  lpFile, ; 
    STRING  lpParameters, STRING  lpDirectory, INTEGER nShowCmd 

...
lcop = ""
...
lnresult = ShellExecute(0, lcop, lcFilename, lcparms, lcpath, lnWindowState)
...
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform