Author: cwittich
Date: Wed Jan 30 19:02:49 2008
New Revision: 32056
URL:
http://svn.reactos.org/svn/reactos?rev=32056&view=rev
Log:
use FILE_SHARE_READ | FILE_SHARE_WRITE to open files which are in use by another process
See issue #3011 for more details.
Modified:
trunk/reactos/base/applications/notepad/dialog.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c (original)
+++ trunk/reactos/base/applications/notepad/dialog.c Wed Jan 30 19:02:49 2008
@@ -289,7 +289,7 @@
if (!DoCloseFile())
return;
- hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
+ hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{