Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running external program
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01051001
Message ID:
01051217
Views:
7
This message has been marked as a message which has helped to the initial question of the thread.
Is this can help?

Searching for the specified file using the SearchPath
http://www.news2news.com/vfp/?example=250&function=397

The code uses SearchPath function from kernel32 API:
DECLARE INTEGER SearchPath IN kernel32;
	STRING    lpPath,;
	STRING    lpFileName,;
	STRING    lpExtension,;
	INTEGER   nBufLen,;
	STRING  @ lpBuffer,;
	INTEGER @ lpFilePart
By default, the function searches for a matching file in the following directories in the following sequence:

The directory from which the application loaded.

The current directory.

The system directory. Use the GetSystemDirectory function to get the path of this directory.

The 16-bit system directory. There is no function that retrieves the path of this directory, but it is searched.

The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.

The directories that are listed in the PATH environment variable.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform