Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.21 KB

_lopen.md

File metadata and controls

51 lines (34 loc) · 1.21 KB

Home

Function name : _lopen

Group: File Management - Library: kernel32


Opens an existing file and sets the file pointer to the beginning of the file.


Code examples:

A procedure for setting file times

Declaration:

HFILE _lopen(
	LPCSTR  lpPathName,	// address of name of file to open
	int  iReadWrite 	// file access mode
);  

FoxPro declaration:

DECLARE INTEGER _lopen IN kernel32;
	STRING  lpFileName, INTEGER iReadWrite  

Parameters:

lpPathName Points to a null-terminated string that names the file to open. The string must consist of characters from the Windows ANSI character set.

iReadWrite Specifies the modes in which to open the file.


Return value:

If the function succeeds, the return value is a file handle. If the function fails, the return value is HFILE_ERROR


Comments:

This function is provided for compatibility with 16-bit versions of Windows. Win32-based applications should use the CreateFile function.