Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registry File Search
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00196580
Message ID:
00196771
Views:
28
>George,
>
>Do you have the api call fro this and maybe an example?
>
>Ron
>
>
Hi Ron,

Here's an example call:
DECLARE INTEGER FindExecutable IN Shell32;
  STRING @lpFile, STRING @lpDirectory,;
  STRING @lpResult
* lcfile is the fully qualified file name to be used
* to retrieve the executable name
lcpath = JUSTPATH(lcfile) && In VFP 6.0. 5.0 requires Foxtools
lcbuffer = SPACE(260)
lnresult = FindExecutable(@lcfile, @lcpath, @lcbuffer)
IF lnresult > 32
  * The function succeeded.
  * Strip off any parameters here.
ENDIF
If the return value is 31, there's no executable associated with the file. Values less than or equal to 32 are errors.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform