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:
Comparing file times
How to set Creation Date/Time for a folder (WinNT)
Locking and unlocking file of a VFP table
Passing data records between VFP applications via the Clipboard
Retrieving file information for the VFP executable running
Setting the date and time that a file was created
Using File Mapping for enumerating files opened by Visual FoxPro
Using GetFileSize
Using InternetSetFilePointer when resuming interrupted download from the Internet
OpenFile
    Add comment     W32 Constants      Translate this page
The OpenFile function creates, opens, reopens, or deletes a file
Code examples:
Passing data records between VFP applications via the Clipboard
Using File Mapping for enumerating files opened by Visual FoxPro
Using InternetSetFilePointer when resuming interrupted download from the Internet
Setting the date and time that a file was created
Locking and unlocking file of a VFP table
How to set Creation Date/Time for a folder (WinNT)
Retrieving file information for the VFP executable running
Comparing file times
Using GetFileSize
Declaration:
HFILE OpenFile(
  LPCSTR lpFileName,        // file name
  LPOFSTRUCT lpReOpenBuff,  // file information
  UINT uStyle               // action and attributes
);
FoxPro declaration:
DECLARE INTEGER OpenFile IN kernel32;
    STRING   lpFileName,;
    STRING @ lpReOpenBuff,;
    INTEGER  wStyle
Parameters:
lpFileName
[in] Pointer to a null-terminated string that names the file to be opened

lpReOpenBuff
[out] Pointer to the OFSTRUCT structure that receives information about the file when it is first opened. The structure can be used in subsequent calls to the OpenFile function to refer to the open file

uStyle
[in] Specifies the action to take
Return value:
If the function succeeds, the return value specifies a file handle
My comment:
After being open the file can be closed by CloseHandle. And oh, of course it can be read, written etc.
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2001-11-26 16:02:06
Visited in last 7 days: 105
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.145.16.43)
24 sec.Function: 'FindFirstFile'
45 sec.Function: 'UuidCompare'
1.08 min.Function: 'RegEnumKeyEx'
1.47 min.Function: 'RegSaveKey'
1.85 min.Function: 'GetLongPathName'
2.28 min.Function: 'SetWindowLong'
2.75 min.
Function group: 'Desktop Window Manager (DWM)'
4.03 min.Function: 'BeginPath'
Google
Advertise here!