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:
Creating a file, then moving it to another destination
How to convert a bitmap file to monochrome format (1 bpp)
How to set Creation Date/Time for a folder (WinNT)
HOWTO: Use the Win32 API to Access File Dates and Times
Monitoring changes occurring within a directory
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Peer-to-peer LAN messenger built with Mailslot API functions
Storing content of the Clipboard to a bitmap file
Storing screen shot of a form to bitmap file
Subclassing CommandButton control to create BackColor property
Testing serial ports
Using InternetSetFilePointer when resuming interrupted download from the Internet
Using mailslots to send messages on the network
Using named pipes for interprocess communication
Using the CreateFile
Using the DeleteFile
Vertical Label control
CreateFile
    Add comment     W32 Constants      Translate this page
This function creates, opens, or truncates a file, communications resource, disk device, or console. It returns a handle that can be used to access the object. It can also open and return a handle to a directory.

Use the CloseHandle function to close an object handle returned by CreateFile
Code examples:
How to convert a bitmap file to monochrome format (1 bpp)
HOWTO: Use the Win32 API to Access File Dates and Times
How to set Creation Date/Time for a folder (WinNT)
Storing screen shot of a form to bitmap file
Peer-to-peer LAN messenger built with Mailslot API functions
Storing content of the Clipboard to a bitmap file
Subclassing CommandButton control to create BackColor property
Vertical Label control
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Testing serial ports
Declaration:
HANDLE CreateFile(
    LPCTSTR lpFileName, 
    DWORD dwDesiredAccess, 
    DWORD dwShareMode, 
    LPSECURITY_ATTRIBUTES lpSecurityAttributes, 
    DWORD dwCreationDispostion, 
    DWORD dwFlagsAndAttributes, 
    HANDLE hTemplateFile);
FoxPro declaration:
DECLARE INTEGER CreateFile IN kernel32;
    STRING  lpFileName,;
    INTEGER dwDesiredAccess,;
    INTEGER dwShareMode,;
    INTEGER lpSecurityAttributes,;
    INTEGER dwCreationDisposition,;
    INTEGER dwFlagsAndAttributes,;
    INTEGER hTemplateFile
Parameters:
Skipped
Return value:
An open handle to the specified file indicates success
My comment:
lpSecurityAttributes is ignored for Win9*.

Attribute FILE_FLAG_DELETE_ON_CLOSE -- is handy for creating temporary files. Indicates that the operating system is to delete the file immediately after all of its handles have been closed. So you don"t care to delete this file afterwards. When you do not need it anymore -- just close the handle or exit VFP.

The huge variety of avilable attributes makes this command very strong and sophisticated.
The function also can be used to put a message in a mailslot.

See also: CreateFileTransacted
Word Index links for the CreateFile :
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: 2010-05-24 12:25:33
Visited in last 7 days: 97
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.167.11.16)
7 sec.Function: 'Escape'
12 sec.Function: 'JetCommitTransaction'
Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
Google
Advertise here!