Using Win32 functions in Visual FoxPro Image Gallery
File Management
..msdn
CopyFile
CopyFileTransacted
CreateDirectory
CreateFile
CreateFileTransacted
CreateHardLink
CreateSymbolicLink
DeleteFile
DeleteFileTransacted
FindClose
FindCloseChangeNotification
FindFirstChangeNotification
FindFirstFile
FindNextChangeNotification
FindNextFile
FlushFileBuffers
GetBinaryType
GetCurrentDirectory
GetDriveType
GetFileAttributes
GetFileAttributesEx
GetFileInformationByHandle
GetFileType
GetFullPathName
GetLongPathName
GetShortPathName
GetTempFileName
GetTempPath
LockFile
MoveFile
MoveFileTransacted
OpenFile
QueryDosDevice
ReadDirectoryChangesW
ReadFile
RemoveDirectory
RemoveDirectoryTransacted
ReplaceFile
SearchPath
SetCurrentDirectory
SetEndOfFile
SetFileAttributes
SetFilePointer
SetFilePointerEx
SetSearchPathMode
UnlockFile
WriteFile
_lclose
_lopen
Code examples:
Searching for the specified file using the SearchPath
SearchPath
..msdn    Add comment     W32 Constants      Translate this page
The SearchPath function searches for the specified file.
Code examples:
Searching for the specified file using the SearchPath
Declaration:
DWORD SearchPath(
  LPCTSTR lpPath,      // search path
  LPCTSTR lpFileName,  // file name
  LPCTSTR lpExtension, // file extension
  DWORD nBufferLength, // size of buffer
  LPTSTR lpBuffer,     // found file name buffer
  LPTSTR *lpFilePart   // file component
);
FoxPro declaration:
DECLARE INTEGER SearchPath IN kernel32;
    STRING    lpPath,;
    STRING    lpFileName,;
    STRING    lpExtension,;
    INTEGER   nBufLen,;
    STRING  @ lpBuffer,;
    INTEGER @ lpFilePart
Parameters:
lpPath
[in] Pointer to a null-terminated string that specifies the path to be searched for the file.

lpFileName
[in] Pointer to a null-terminated string that specifies the name of the file to search for.

lpExtension
[in] Pointer to a null-terminated string that specifies an extension to be added to the file name when searching for the file.

nBufferLength
[in] Specifies the length, in TCHARs, of the buffer that receives the valid path and file name.

lpBuffer
[out] Pointer to the buffer that receives the path and file name of the file found.

lpFilePart
[out] Pointer to the variable that receives the address (within lpBuffer) of the last component of the valid path and file name, which is the address of the character immediately following the final backslash (\) in the path.
Return value:
If the function succeeds, the value returned is the length, in TCHARs, of the string copied to the buffer, not including the terminating null character.
My comment:
If the path to be searched for the file is NULL, 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 Windows system directory.
  • The Windows directory.
  • The directories that are listed in the PATH environment variable.
Word Index links for the SearchPath :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-01-14 19:13:36
Modified: 2002-01-14 19:29:38
Visited in last 7 days: 17
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.161.228.29)
3.2 min.
13.15 min.Function: 'JetEndSession'
4.27 hrs.Gallery
Page 3
4.28 hrs.Example: 'Running a regular FoxPro form while main VFP window is minimized'
4.29 hrs.Function: 'GetMonitorContrast'
4.3 hrs.Example: 'Using InternetSetFilePointer when resuming interrupted download from the Internet'
4.31 hrs.Function: 'AVIStreamGetFrame'
Function group: 'Windows Multimedia'
4.33 hrs.Function: 'GetOpenFileName'
4.38 hrs.Example: 'Enumerating ODBC drivers available on the local computer'
2 day(s)Example: 'Using Video Capture: enumerating installed capture drivers'
Google
Advertise here!