please dont rip this site Prev Next

_lopen info  Overview  Group

The _lopen function opens an existing file and sets the file pointer to the beginning of the file. This function is provided for compatibility with 16-bit versions of Windows. Win32-based applications should use the CreateFile function.

HFILE _lopen(

    LPCSTR lpPathName,

// pointer to name of file to open

    int iReadWrite 

// file access mode

   );

Parameters

lpPathName
Pointer 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. This parameter consists of one access mode and an optional share mode. The access mode must be one of the following values:

Value

Meaning

OF_READ

Opens the file for reading only.

OF_READWRITE

Opens the file for reading and writing.

OF_WRITE

Opens the file for writing only.

The share mode can be one of the following values:

Value

Meaning

OF_SHARE_COMPAT

Opens the file in compatibility mode, enabling any process on a given computer to open the file any number of times. If the file has been opened by using any of the other share modes, _lopen fails.

OF_SHARE_DENY_NONE

Opens the file without denying other processes read or write access to the file. If the file has been opened in compatibility mode by any other process, _lopen fails.

OF_SHARE_DENY_READ

Opens the file and denies other processes read access to the file. If the file has been opened in compatibility mode or for read access by any other process, _lopen fails.

OF_SHARE_DENY_WRITE

Opens the file and denies other processes write access to the file. If the file has been opened in compatibility mode or for write access by any other process, _lopen fails.

OF_SHARE_EXCLUSIVE

Opens the file in exclusive mode, denying other processes both read and write access to the file. If the file has been opened in any other mode for read or write access, even by the current process, _lopen fails.

Return Values

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

If the function fails, the return value is HFILE_ERROR. To get extended error information, call GetLastError.

See Also

CreateFile 

See:


file: /Techref/os/win/api/win32/func/src/f00_5.htm, 5KB, , updated: 2001/6/26 09:34, local time: 2024/11/25 18:15,
TOP NEW HELP FIND: 
3.138.124.123:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/os/win/api/win32/func/src/f00_5.htm"> _lopen</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .