forked from enlightenment/efl
Eina : eina_file_win32.c : add share mode when opening a file
On Windows, if you want to open the same file several times, you have to tell it can... No ChangeLog as that code is work in progress) SVN revision: 59857
This commit is contained in:
parent
a04de9e388
commit
1a833d15a4
|
@ -778,17 +778,20 @@ eina_file_open(const char *filename, Eina_Bool shared)
|
|||
/* FIXME: always open absolute path (need to fix filename according to current
|
||||
directory) */
|
||||
|
||||
/* FIXME: how to emulate shm_open ? Just OpenFileMapping ? */
|
||||
#if 0
|
||||
if (shared)
|
||||
/* FIXME: shm_open is maybe not really that */
|
||||
handle = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY,
|
||||
NULL);
|
||||
else
|
||||
handle = CreateFile(filename, GENERIC_READ, 0,
|
||||
#endif
|
||||
handle = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY,
|
||||
NULL);
|
||||
|
||||
if (handle == INVALID_HANDLE_VALUE) return NULL;
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||
if (!fm)
|
||||
|
|
Loading…
Reference in New Issue